Posts
5724
Following
218
Followers
554
Linux kernel mm contributor, kernel/systems developer, writing a book about mm.

C/C++/(rust at some point!)

Book - https://linuxmemory.org/
Me - https://ljs.io/
Music - https://soundcloud.com/distal_music/

Arsenal fan, cat maniac, synth experimentalist. Brit.

Opinions are all my own and represent nobody else.

Lorenzo Stoakes

Was hoping I could finish the swap chapter today, but swap readahead has thwarted me.

Back on it tmr.
0
0
1
@vbabka @cwayne @dougmerritt @sven maybe get you to eat mine as well to help with operation "get your mates fatter than you"
0
0
2

i cant login to discord because they forgot to add the 0 key to the numpad

10
12
4

Lorenzo Stoakes

Signs the book is (too?) big - I am constantly having to grep for things to see if I mentioned them before...
0
0
1

Lorenzo Stoakes

One of the ways you can get tripped up in kernel code is that sometimes something really major happens and it isn't in any way highlighted.

For instance - when reading from disk into a folio (whether file-backed or from swap), the folio is locked and will become unlocked once it is 'uptodate' (i.e. has the PG_uptodate flag set).

That renders all instances of trying to lock a folio a barrier that either waits for the read to happen or, as if often the case, incorporates some ability to tell the caller 'ok I need to wait on I/O try again later' as userland experiences with async I/O.

A good example of this is do_swap_page() [0], where we kick off either a synchronous or async read from disk (see block starting at line 3766), but later (line 3878) indicate SIGBUS if the page isn't uptodate.

The key here? Line 3826:

locked = lock_page_or_retry(page, vma->vm_mm, vmf->flags);

We try to lock the page, if I/O is done already we can, if it was synchronous we can, otherwise we either return VM_FAULT_RETRY to indicate the I/O is needed or we wait to acquire the lock.

After this line, we can safely assume the swap has been read from.

I kind of feel that a comment would be helpful here :>) [checking tip I see there isn't one, might add one myself], at the same time it's sort of assumed you'd know this was the case...

While I'm writing the book primarily to learn the mm in more depth, I hope pointing out stuff like this in it will help others over these kind of stumbling blocks.

[0]: https://elixir.bootlin.com/linux/v6.0/source/mm/memory.c#L3718
0
0
4
@dougmerritt @cwayne @sven haha I was kidding about arby's, seems a meme for bad restaurants (might be wrong though).

To be honest with diet the odds of me really eating much of interest are very low, and I'm an addict to food man, I can't let myself off really.

Except maybe MAYBE for an in'n'out. One, no fries... maybe more steps? :)
1
0
3

Lorenzo Stoakes

Transcendence.
0
0
4

Martin Boller 🇺🇦 tux freebsd windows mastodon

2
1
1
@marzee @fromjason yes me too! Sits in the corner quietly and prints when told to. Glorious (low bar in the printer world!)
1
0
6

Lorenzo Stoakes

Mary chilling on #caturday
0
1
8

Lorenzo Stoakes

A great deal of harm has been done to society by people who have zero understanding of the internet and social media taking things said there at face value.
0
2
4
@sven @cwayne ohhhh!

Diet really shouldn't permit a burger but... I have heard incredible things about in'n'out
2
0
4
@sven @cwayne Utah for lsf/mm, Le City Du Salt Lake
1
0
1

Lorenzo Stoakes

Hey @cwayne I'm coming to the US soon + since I'm on a strict diet I'm a bit limited what I can eat but I hear that arby's is the best restaurant in america, what would you recommend from their menu? Cheers!
1
0
1
@djasa @overholt LOL well Altman is utter and complete scum and I'm sure if you dug deep you'd find... issues with him.

Silicon valley attracts these 'types' rather well, sadly.

His lying about LLMs has been a huge part of kicking off this hideous wave of bullshit we're in now.

And then there's the stuff about his sister, rumours I heard, that I won't repeat because the UK has dreadful defamation laws. But you can google ;)
0
0
0
@pinkforest @calbaker @laund Not pointing fingers to any particular community, project or even language but here's something I observe in modern days of open source.

There has been and probably is still today some toxic behavior for sure in open source projects but there is also some toxic positivity, which means that when you take more critical angle it is interpreted as toxic behavior.
1
1
1
@vbabka @liskin @lkundrak Is this even a word? It seems like you fell on the keyboard and 'Bystrc' came out :(
1
0
1
@liskin @oleksandr @lkundrak Brno is THE GREATEST at all things!!!
0
0
1
Show older