2,468,617 events, 1,538,443 push events, 1,987,816 commit messages, 107,780,628 characters
Holy fuck I am almost done, cables went beautifully and now I only have to copy and paste shit in. Bless
sched/core: Fix ttwu() race
Paul reported rcutorture occasionally hitting a NULL deref:
sched_ttwu_pending() ttwu_do_wakeup() check_preempt_curr() := check_preempt_wakeup() find_matching_se() is_same_group() if (se->cfs_rq == pse->cfs_rq) <-- BOOM
Debugging showed that this only appears to happen when we take the new code-path from commit:
2ebb17717550 ("sched/core: Offload wakee task activation if it the wakee is descheduling")
and only when @cpu == smp_processor_id(). Something which should not be possible, because p->on_cpu can only be true for remote tasks. Similarly, without the new code-path from commit:
c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu")
this would've unconditionally hit:
smp_cond_load_acquire(&p->on_cpu, !VAL);
and if: 'cpu == smp_processor_id() && p->on_cpu' is possible, this would result in an instant live-lock (with IRQs disabled), something that hasn't been reported.
The NULL deref can be explained however if the task_cpu(p) load at the beginning of try_to_wake_up() returns an old value, and this old value happens to be smp_processor_id(). Further assume that the p->on_cpu load accurately returns 1, it really is still running, just not here.
Then, when we enqueue the task locally, we can crash in exactly the observed manner because p->se.cfs_rq != rq->cfs_rq, because p's cfs_rq is from the wrong CPU, therefore we'll iterate into the non-existant parents and NULL deref.
The closest semi-plausible scenario I've managed to contrive is somewhat elaborate (then again, actual reproduction takes many CPU hours of rcutorture, so it can't be anything obvious):
X->cpu = 1
rq(1)->curr = X
CPU0 CPU1 CPU2
// switch away from X
LOCK rq(1)->lock
smp_mb__after_spinlock
dequeue_task(X)
X->on_rq = 9
switch_to(Z)
X->on_cpu = 0
UNLOCK rq(1)->lock
// migrate X to cpu 0
LOCK rq(1)->lock
dequeue_task(X)
set_task_cpu(X, 0)
X->cpu = 0
UNLOCK rq(1)->lock
LOCK rq(0)->lock
enqueue_task(X)
X->on_rq = 1
UNLOCK rq(0)->lock
// switch to X
LOCK rq(0)->lock
smp_mb__after_spinlock
switch_to(X)
X->on_cpu = 1
UNLOCK rq(0)->lock
// X goes sleep
X->state = TASK_UNINTERRUPTIBLE
smp_mb(); // wake X
ttwu()
LOCK X->pi_lock
smp_mb__after_spinlock
if (p->state)
cpu = X->cpu; // =? 1
smp_rmb()
// X calls schedule()
LOCK rq(0)->lock
smp_mb__after_spinlock
dequeue_task(X)
X->on_rq = 0
if (p->on_rq)
smp_rmb();
if (p->on_cpu && ttwu_queue_wakelist(..)) [*]
smp_cond_load_acquire(&p->on_cpu, !VAL)
cpu = select_task_rq(X, X->wake_cpu, ...)
if (X->cpu != cpu)
switch_to(Y)
X->on_cpu = 0
UNLOCK rq(0)->lock
However I'm having trouble convincing myself that's actually possible on x86_64 -- after all, every LOCK implies an smp_mb() there, so if ttwu observes ->state != RUNNING, it must also observe ->cpu != 1.
(Most of the previous ttwu() races were found on very large PowerPC)
Nevertheless, this fully explains the observed failure case.
Fix it by ordering the task_cpu(p) load after the p->on_cpu load, which is easy since nothing actually uses @cpu before this.
Fixes: c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") Reported-by: Paul E. McKenney [email protected] Tested-by: Paul E. McKenney [email protected] Signed-off-by: Peter Zijlstra (Intel) [email protected] Signed-off-by: Ingo Molnar [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Adam W. Willis [email protected] Signed-off-by: Diaz1401 [email protected]
Replace JSMN with my own JSON parser
basic crappy parser
It's kinda ugly and my hashmap implementation sucks but it sorta works xd
skip tokenizing
reimplement parse_array() and test with blocks.json
use atof() instead of sscanf()
sscanf() called strlen() internally every time, which was pretty slow. atof() also handles +/- and the exponent notation for me, so that's nice
hashmap: use linear probing instead of chaining
hashmap: don't strdup() keys in hashmap_add()
return slightly more useful errors
rewrite using streams so the logic can be reused with files
make sure test_huge() is actually reading stuff
Sure, it makes it through the parser without spitting out errors, but I don't really know if it's properly reading the stuff
fix linear append time in parse_array()
Revert "rewrite using streams so the logic can be reused with files"
This reverts commit 380171cca60f53595ea3db64078df2a1a26d9133.
The stream implementation was pretty neat, but it's kinda slow and allocates a lot of tiny chunks of memory because of parse_string(). I think it would be faster if strings were just references into the provided JSON string, and streams obviously won't allow for something like that, so bye bye streams
store strings as pointers into json_string
It's a little faster I guess
add json_parse_file()
rewrite old JSON code using the new library
fix my garbage """tests""" so they compile again
add some more tests
return a more helpful error when truthy values have extra junk at the end
remove JSON_EXPECTED_DIGIT, just use JSON_INVALID_NUMBER
add JSON_MISSING_CLOSING
fix mem leak in json_expect_error()
rewrite test_simple() using json_equal()
expose json_equal() cus why not
fix missing commas between object members being silently ignored
fix trailing commas in objects being ignored
don't ignore missing/trailing commas in arrays
add some eof tests
check that parsing blocks.json results in 680 members of the root object
just an extra little sanity check
JSON_INVALID_SYNTAX -> JSON_EXPECTED_VALUE
fix memory leak when a member has no value
fix segfault when parsing an empty string
that's a pretty important one
add some extra edge-case tests for objects i guess
fix is_whitespace() not counting \r or \t
add a little reminder
verify that every block state in blocks.json is parsed correctly
Finished User System (I hate my life i've tried harder things for nothing)
Add solution for day 4 - F#
Holy shit that was painful.
just use a fucking try catch
it's not that hard this is the cleanest code i've seen in a while and yet you cant even use a try catch holy fuck mikey
Cat and Dog classes won't use their own bloody damn makeSound shit
Finished the stupid goddamn welcome statement holy shit why did I take jarrod's advice on that triple split design. that was such a pain in the ass but it works. Too long...working...need break
Merge pull request #3 from Evanlyboy/dev.EH.addingWelcome
Finished the stupid goddamn welcome statement holy shit why did I tak…
Tweaked and bug fixed and now onto page 3. Gonna so nice to finish this damned thing. It's a beauty but my god is it taking a fortnight to finish
Added default text, updated for loop format for swift, began print
Dear diary, I added a temporary default text to the providedText so that way I do not have to speak/type an example every time I want to test the program. I then ran example and realized that the output format was still for C# and so I updated the for loop area to output swiftui. I then began working on the print statement. The issue with this is how will I know when the string has ended considering a string can contain any words. Oh maybe I'll have an exit command like "string end". Yeah I think I will do this to make things less complex, at least for the time being. XOXO Isaac
Yay! It was very easy and fast once I switched to Python! I love Haskell but sometimes holy shit fuck Haskell!
day 5 complete, and holy hell is my solution ugly. i will refactor it to be more efficient and cleaner to read for sure.
ELECTRON IS SO FUCKING STUPID LMAO FUCKING KILL ME PIECE OF SHIT SOFTWARE
Post your pictures and videos for me to rate
Best kinda kink wins one hour masturbation video call or one free night long mutual body on body massage 69 style with professional amateur female photographer filming and helping with anything she wants to do with us
Update index-de.html
-Please check wether the additional information work and were well integrated in the website -2 new information are in the "Create" section left and right besides the screenshot -1 new information in the "Play" section on the second place -the 1. information in the "Play" section was shortened because of the new information -The additional information from Discord: "Sooo… longt text incoming: The German version is (hopefully) ready. (I sent the propose for changes.) As told above I separated the information in the „Play“ section. This is point 5-8. I also added two „new“ information in the „Create“ section to draw some additional attention to the buttons on the top right (point 1-4). @Tantum: I’m sorry if I was over engaged in this. …I know it creates extra work for you… In the case that you are all right with the new texts, I would post the English part in the translations channels.
English:
-
Learn from tutorials
-
In illustrated tutorials and detailed instructions all functions are explained in a simple way. (link on the top right)
-
Ask other authors
-
Become part of the Valkyrie Discord community and ask other authors for advice on problems. (link on the top right)
-
Enjoy your creation
-
Test your content during creation and play it anytime after completion.
-
Discover numerous other adventures
-
Experience the stories of other authors. Sort them by existing languages and required extensions. Choose by duration, difficulty and rating.
-
Lerne von Tutorials
-
In bebilderten Tutorials und ausführlichen Anleitungen werden alle Funktionen einfach erklärt. (Link oben rechts)
-
Stelle anderen Autoren Fragen
-
Werde Teil der Valkyrie Discord Gemeinschaft und frage bei Problemen andere Autoren um Rat. (Link rechts oben)
-
Genieße dein Werk
-
Teste deine Inhalte während der Erstellung und spiel sie nach Fertigstellung jederzeit.
-
Entdecke zahlreiche weitere Abenteuer
-
Erlebe die Geschichten von anderen Autoren. Sortiere sie nach vorhandenen Sprachen und benötigten Erweiterungen. Wähle nach Dauer, Schwierigkeit und Bewertung. "
Work In Progress
Added custom PlayerStates, GameState, made backup of GameMode and rewrote it for cleanliness Created some foundation for the multiplayer lobby but dropped it in favor of working on other things. Made some progress on the turn based interface (players can now individually flag themselves as ready/not ready) and added structs for player orders. Fucking camera pawn doesn't want to move anymore holy shit die in a fire.
"11:15am. I am up. Let me skip the morning session since it is late.
11:45am. Ok, let me watch it just for a bit. For today I am also going to get a better ref the face rather than that grainy full body one in the background.
Let me watch how Flycat does it. Rather, let me watch the retopo part.
First of all, I should absolutely make sure that my model's lips are the right size and that it is not just my imagination as to what is wrong.
It seems the PL sub monthly is still not up. Dead mod.
https://youtu.be/VzMAh66ofq0?t=789
There is a good shot here. Let me go for it.
12:05pm. Ok, the results are surprising to me. The ears, eyes, and mouth are only a tiniest bit off from the reference. Which is very good, there is no need to fix this. I though that my mouth's size might be off, but that is not it.
12:10pm. Rather the problem might be simpler. The upper lip is too far out, and that connecting bridge need just a bit more definition near the nose. I neglected to do that. Let me use the mask so I can fix this succinctly.
12:35pm. No it does not match the reference. But you know what, let me just leave it as it is. The refs lips are quite round and mine aren't.
12:40pm. Let me get breakfast. After that I'll get to work on the face. That part should not be too hard.
1:15pm. Done with chores. Since lunch will be early today, I'll wait another hour before having my meal.
Let me finally deal with the fa ce itself.
1:25pm. The clay brush really works better with the autosmoothing. This is how the clay strips is by default.
1:30pm. Good. Let me just carve the upper and lower eyelid.
2pm. Done with the eyebrows.
Let me leave for lunch.
2:25pm. I am back.
Hmmm, the eyelids look a bit too wobly for my taste. Let me max out the detail on them.
2:30pm. Hmmm, the eye wobbliness really rounds the feel.
3:05pm. Andddd...done!
Phew I am done with the base body mesh. When did I start work on this?
3:10pm. Exactly two weeks ago, a day after I started the Impuritas Civitatis chapter of Ruina. This ia long time to push a single project. But I did learn a lot about sculpting. This kind of lifestyle doing this would not be bad, but I need to get back to drawing. That having said, I should take a bunch of screenshots and post it in the /beg/ thread.
The back of the arm is a bit worrying. Let me smooth out that biceps. I do not want it to be so pronounced...no, no. Just leave it. Forget the tablet. I am done.
I should consider where to put this art. Let me take a break here.
https://www.youtube.com/results?search_query=blender+topology+rake
Let me see what topo rake does. I keep seeing that setting and do not know what it does.
Oh there is a picture that explains it here as well. This might be a really good feature to keep on.
https://youtu.be/oWtrkSj85Ak?t=11
Ohhh, maybe I should have used face sets in order to straighten out the eyelids better. Well, things are good now so it is fine.
3:25pm. The video is useless, but the picture is worth enough on its own. It is all fine. I regret not using the clay brush with smoothing turned off more, but otherwise everything turned out quite well.
The Blender sub is quite active.
3:30pm. Ok, let me take a bunch of screenshots. I'll put them in a single file.
3:50pm. Actually forget a single file. I'll separate them out into different posts. Now let me post them on /beg/.
...No, that would end up being 19 posts. I need to marge some of them together.
4:05pm. Merged them by hand. Now let me post them.
5pm. Maybe I should have skipped posting them. But I'd be happy if even one other person saw my work. It is a bit too good to vanish into the darkness.
5:05pm. Goodbye, base mesh. I am off to bigger and better things from here on out.
I think at this point in my development I am definitely in 2/5 in art. At this rate, it will take me a full year of practice to break into 3/5, but that is fine.
5:10pm. I need to think what is next.
- Naked Luna (Hell's Prototype) cupping her breast while looking in the mirror with a grin on her face.
- Concept art of Luna in a red dress.
- Euclid (Heaven't Key) based and virtual forms.
5:15pm. You need a lot of energy and skill to do something like a comic, but an illustrated novel has lesser requirements. Good looking drawings of men and women are my next hurdle. If I can get a decent result on the above challenges, that should be enough to get started in the art department. I'll give it a month or two more.
5:25pm. Right now let me take a break. Maybe I'll call it for the day. What my immediate goal will be is to finish those Ctrl + Paint videos as well as the other tutorials. That should not take long. Then I will draw some things. I'll start with basic stuff, but I'll pick some anime images and try to replicate them without tracing. Right now I am reading the archived Symphogear thread, so I am thinking Cag or Shem-ha.
My drawing still has ways to go. In sculpting I did do that major project, so I can boast of having some skill now, but I still haven't drawn anything other than that hand sketch and the watering can. And the spatula. I need to change that. I need to take on some significant projects and push them through to completion. Right now I only have a feeling that I could do it. But like with sculpting, I have a lot to learn.
The only way to learn is to do it right.
5:35pm. I see a lot of people doing basic exercises, but I see that as a waste of time. I did not get good at programming by writing a hello world program every day. Rather the way to get good is to ramp up the complexity.
5:50pm. Bath, then I'll watch some videos. I am not done for the day yet. But every time one finishes a good project, it is good to take some relief time. After that it will be time to raise the tension again.
6:50pm. Let me watch art vids for a bit and then I'll close for the day.
7:15pm. https://www.ctrlpaint.com/videos/selective-blending-for-overlays
I've refereshed my memory of the videos I've watched last time. This is where I left off. I'll watch this tomorrow. It is time to slowly move out of the bare beginner phase in 2d art."
Got BarGraphCategory to render based on REAL DATA
function renders everything properly now. Holy Shit. I hate everything.
name-rev: prefer shorter names over following merges
name-rev has a MERGE_TRAVERSAL_WEIGHT to say that traversing a second or later parent of a merge should be 65535 times more expensive than a first-parent traversal, as per ac076c29ae8d (name-rev: Fix non-shortest description, 2007-08-27). The point of this weight is to prefer names like
v2.32.0~1471^2
over names like
v2.32.0~43^2~15^2~11^2~20^2~31^2
which are two equally valid names in git.git for the same commit. Note that the first follows 1472 parent traversals compared to a mere 125 for the second. Weighting all traversals equally would clearly prefer the second name since it has fewer parent traversals, but humans aren't going to be traversing commits and they tend to have an easier time digesting names with fewer segments. The fact that the former only has two segments (~1471, ^2) makes it much simpler than the latter which has six segments (~43, ^2, ~15, etc.). Since name-rev is meant to "find symbolic names suitable for human digestion", we prefer fewer segments.
However, the particular rule implemented in name-rev would actually prefer
v2.33.0-rc0~11^2~1
over
v2.33.0-rc0~20^2
because both have precisely one second parent traversal, and it gives the tie breaker to shortest number of total parent traversals. Fewer segments is more important for human consumption than number of hops, so we'd rather see the latter which has one fewer segment.
Include the generation in is_better_name() and use a new effective_distance() calculation so that we prefer fewer segments in the printed name over fewer total parent traversals performed to get the answer.
== Side-note on tie-breakers ==
When there are the same number of segments for two different names, we
actually use the name of an ancestor commit as a tie-breaker as well.
For example, for the commit cbdca289fb in the git.git repository, we
prefer the name v2.33.0-rc0112^21 over v2.33.0-rc057^25. This is
because:
- cbdca289fb is the parent of 25e65b6dd5, which implies the name for cbdca289fb should be the first parent of the preferred name for 25e65b6dd5
- 25e65b6dd5 could be named either v2.33.0-rc0
112^2 or v2.33.0-rc057^2~4, but the former is preferred over the latter due to fewer segments - combine the two previous facts, and the name we get for cbdca289fb
is "v2.33.0-rc0
112^21" rather than "v2.33.0-rc057^25".
Technically, we get this for free out of the implementation since we only keep track of one name for each commit as we walk history (and re-add parents to the queue if we find a better name for those parents), but the first bullet point above ensures users get results that feel more consistent.
== Alternative Ideas and Meanings Discussed ==
One suggestion that came up during review was that shortest
string-length might be easiest for users to consume. However, such a
scheme would be rather computationally expensive (we'd have to track all
names for each commit as we traversed the graph) and would additionally
come with the possibly perplexing result that on a linear segment of
history we could rapidly swap back and forth on names:
MYTAG3^2 would be preferred over MYTAG9998
MYTAG3^21 would NOT be preferred over MYTAG9999
MYTAG3^22 might be preferred over MYTAG10000
Another item that came up was possible auxiliary semantic meanings for name-rev results either before or after this patch. The basic answer was that the previous implementation had no known useful auxiliary semantics, but that for many repositories (most in my experience), the new scheme does. In particular, the new name-rev output can often be used to answer the question, "How or when did this commit get merged?" Since that usefulness depends on how merges happen within the repository and thus isn't universally applicable, details are omitted here but you can see them at [1].
[1] https://lore.kernel.org/git/CABPp-BEeUM+3NLKDVdak90_UUeNghYCx=Dgir6=8ixvYmvyq3Q@mail.gmail.com/
Finally, it was noted that the algorithm could be improved by just explicitly tracking the number of segments and using both it and distance in the comparison, instead of giving a magic number that tries to blend the two (and which therefore might give suboptimal results in repositories with really huge numbers of commits that periodically merge older code). However, "[this patch] seems to give us a much better results than the current code, so let's take it and leave further futzing outside the scope."
Signed-off-by: Elijah Newren [email protected] Acked-by: Ævar Arnfjörð Bjarmason [email protected] Acked-by: Johannes Schindelin [email protected] Signed-off-by: Junio C Hamano [email protected]