Conversation

Very happy to announce my book The Linux Memory Manager is now available to pre-order at

https://nostarch.com/linux-memory-manager

It's a comprehensive 1,300 page exploration of how memory functions in Linux that goes into great depth on the subject, and is the first book of its kind for 20 years :)

15
37
5

@ljs Already ordered! I've been eagerly waiting since I first heard you were working on it!

1
0
0
@ljs I want one - but we still have to wait for another half-year or so? By then you're gonna have to restart from scratch... :)
1
0
5

@ljs I had the JavaScript book in that style back in the day, do you know if there's a name for it?

1
0
0

@corbet thanks :) well you can pre-order and get access to the whole thing now (though, the draft) ;;;)

I think with kernel books the only sane way ahead is to say 'well, this is less of a delta to tip than the last book' or one's mind shall be lost in an eternity of darkness :>)

0
0
0

@ljs Congrats, that cover is awesome :)

1
0
0

@hcmh thanks :) placeholder for now though! But it is pleasing :)

0
0
0

@ljs Great cover, and congrats!

0
0
0

@ljs Congratulations Lorenzo. A fantastic achievement. Ordered my copy!

1
0
0

@ljs May I know the availability in India? Thanks

1
0
0

@nayab as far as I can tell shipping is global, and I know a couple of my Indian friends have ordered the physical book with no issues :)

0
0
0

@LongSteve that's very kind of you Steve, and also humbling :) thank you very much for your kind words!

0
0
0

@candidlurker https://nostarch.com/about_ebooks.htm no starch explicitly give you drm-free files, including an epub

so yes :)

1
0
0

@ljs That looks like a lot of work. People should just abandon low-level technology, it's so tedious. Use Python for everything. I am not at all serious, it's good to see people at this frontier.

1
0
0

@hackillu haha sometimes I contemplate becoming a goat or frolicking in the fields. But I love it most of the time :P

0
0
0

@ljs Okay, did the preorder but only found the PDF in my NoStarch account. Maybe it's not available for EA.

1
0
0

@candidlurker yeah sorry I meant the final version has it, but the early access is by its nature quite a rough copy (the final version will have gone through production editing as well as the copy editing etc.)

Apologies and hope that isn't too much of a pain and I hope I didn't mislead you, obviously as the author I am somewhat disconnected from other aspects of the process!

1
0
0

@ljs congratulations, who do you reckon this book is for?

1
0
0

@tuxlife any enthusiastic developer with knowledge of C and OS fundamentals who is willing to put in the time to learn about how memory works in linux.

I am an ex-hobbyist-turned-pro so I am a huge advocate of exploring things because you want to like that.

But of course it's useful to kernel and systems developers too! When most books on this kind of thing wave hands, this does the complete opposite, going direct to the kernel source.

0
0
0

@luvcie porco dio I did! Though pending an edit :)

Came out of fedi obscurity to tell the world...

1
0
0

@ljs that is all kind of porco-dio awesome! I'll save the page you shared.
I completely rewrote my open source music app about a year ago, and it's "stable" since a few months https://floss.social/@powerampache

1
0
0

@luvcie bella bella bella! Congrats :)

The linux kernel is 'stable' apart from all the bugs (shh don't tell anyone!)

1
0
0

@ljs I won't tell anyone if you don't go check the issue tracker of my app 😂

1
0
0

@luvcie Mannaggia la madonna! It's a deal!

0
0
0

@ljs
Ordered! Thanks for taking the time and putting in the energy to create this book 👍🏻

1
0
0

@mboelen thank you very much, much appreciated :) I hope it's useful to you!

1
0
0

@ljs
I am pretty sure it will be. It's one of the concepts for non-kernel developers that's not so easy to grasp. So far, I have never seen a good book about this topic. My hope is to get a better understanding and share relevant bits of knowledge in my blog articles at https://linux-audit.com/. Especially when using commands and have readers better understanding the related output.

1
0
0

@mboelen awesome, the book does dive into the code strongly, but assumes only really C + general OS knowledge if you are willing to put in the time to dive through the topics.

Be really cool if you could extract out interesting bits and pieces for your blog!

0
0
0

@wagi well nor do I so you'll be fine ;)

0
0
0

@ljs Congratulations. I read this book for a while and I think it is very good. I have forwarded it to the WeChat public in China. Many people have given me feedback and have bought it.

1
0
0

@ljs Congratulation to the book publication. I hope to find some time one day and look at it myself or at least, will be able to make it available to my students with help of the #cvut library.

I have plea for you and @vbabka , I prepare for the next round of the Advanced Computer Architectures course. It is focused mainly to basic knowledge about progress from pipelined execution (basic course) to the super-scalar one in nineties to understand even later designs including GPUs, NUMA, etc. But I include even some amateur glimpse how is memory used in real system which is based on my already dated wander through Linux kernel sources. I would be very happy if you find time to look at the diagram on the slide 114 of the Lecture 6 and provide me feedback if there is something which is not true or have been changed considerably so I should correct it to not mislead my students. There are some more slides around where your expert feedback can save students from misleading information as well.

1
0
1

@ppisa @ljs@fosstodon.org @vbabka sorry this is from a toot from an old account! This is my current one, @vbabka pointed me here.

And thank you :) hope it'll be useful to you.

That is a very busy diagram haha wi

From brief look:

It's no longer an RB tree for VMAs, it's a maple tree (see https://blogs.oracle.com/linux/post/the-maple-tree-a-modern-data-structure-for-a-complex-problem for details on this)

No sure what a page_tree is, maybe some very old thing, presumably this is the interval tree used by address_space? Which is a rb tree now

Not sure why 'V" before PFN, I guess this is referring to the actual entries in the TLB?

So broadly speaking this has the core components just some outdated bits

^ Very rough look :)

Thanks again for your kind comments re: book :>)

1
0
0

@ljs @vbabka Thanks to both. Yes, I remember to read about new/concurrent/RCU friendly VMA tree at #lwn some time ago, I try fit more letters in the triangle, on the other hand R-B tree is something which students know… but showing maple can be motivation to search for more modern data structures in their future projects, I mention user-space RCU, cuckoo hashing from Knot DNS as well as others.

struct radix_tree_root	page_tree; /* radix tree of all pages */

Good catch, it seems to have gone in 4.17 kernel, when it has been renamed to

struct  radix_tree_root i_pages;

and it has been changed to struct xarray in 4.20. So this is evolution.

So it should be updated to be modern.

VPFN (virtual page frame number) and physical (P)PFN is used by me to distinguish what is view and meaning of address bits before and after MMU translation. It highlights that translation cares only about page sized frames no full addresses. It seems that it is not only mine local invention - used even on WikiBooks/The_Linux_Kernel/Memory.

The goal is to provide mainly an overall picture not details to start hacking and contributions to the kernel so if it is “roughly” appropriate is important. But if some students are attracted to contribute to Linux it would be great outcome. We have more students contributing to #NuttX which is lower bar for starting. But some have contributed drivers to Linux as well.

1
0
1

@ppisa @vbabka ah yeah I did wonder if that was predecessor to xarray, quite an interesting data structure.

And indeed I entirely agree that really it's worth giving a broad overview generally, you can drown in detail on this stuff.

But it is nice to hint at 'cool' data structures also like xarray and maple tree (we actually do hope one day to make xarray == maple tree btw)

0
0
0