440 karma · joined August 9, 2019
k.manaouil@gmail.com
I was once working on CXL [2] and memory ownership tracking in the Linux kernel and wanted to play with Nvidia GPUs, but then I hit a wall when I realised that a lot of the functionalities were running on the GSP or the firmware blob with very little to no documentation, so I ended up generally not liking the system software stack of Nvidia and I gave up the project. UVM subsystem in the open kernel driver is a bit of an exception, but a lot of the control path is still handled and controlled from closed-source cuda libraries in userspace.
tldr; it's very hard to do systems hacking with Nvidia GPUs.
[1] https://www.kernel.org/doc/html/v5.0/vm/hmm.html [2] https://en.wikipedia.org/wiki/Compute_Express_Link
The TLB is a hardware cache with a limited number of entries that cannot dynamically change. Your CPU is shipped with a fixed number of entries dedicated for each page size. Translations of base 4 KiB pages could, for example, have 1024 entries. Translations of 2 MiB pages could have 512 entries and those of 1 GiB usually have a very limited number of only 8 or 16. Nowadays, most CPU vendors increased their 2 MiB TLBs to have the same number of entries dedicated for 4 KiB pages.
If you're wondering why they have to be separate caches, it's because, for any page in memory, you can have both mappings at the same time from different processes or different parts of the same process, with possibly different protections.
> - Would memory allocators / GCs need to be changed to deal with blocks of 1G? Would you say, the current ones found in popular runtimes/implementations are adept at doing so?
> - Does it not adversely affect databases accustomed to smaller page sizes now finding themselves paging in 1G at once?
Runtimes and databases have full control and Linux allows per-process policies via madvise) system call. If a program is not happy with huge pages, it can ask the kernel to be ignored, as it can choose to be cooperative.
> If the dissertation is public, please do link it, if you're comfortable doing so.
I'm still in the PhD process, so no cookies atm :D
As I mentioned before, most major Linux distributions ship with THP enabled by default. THP automatically allocates huge pages for mmap memory whenever possible (that is when, at least, the region is 2 MiB aligned and is at least 2 MiB in size). There is also a separate kernel thread, khugepaged, that opportunistically tries to coalesce/promote base 4K pages into 2 MiB huge pages, whenever possible.
Library support is not really required for THP, but could be detrimental for its performance and availability on the long run. A library that is not aware of kernel huge pages may employ suboptimal memory management strategies, resulting in inefficient utilization, for example by unintentionally breaking those huge pages (e.g. via unaligned unmapping), or failing to properly release them to the OS as one full unit, undermining their availability on the long run. Afaik, Tcmalloc from Google is the only library with extensive huge page awareness [1].
> Do the heuristics used by Linux THP (khugepaged) really allow completely ignoring whether pages have actually been page-faulted in or even initialised? Is a possibility unlikely to happen in practice?
Linux allocates huge pages on first touch. For khugepaged, it only coalesces the pages if all the base pages covering the 2 MiB virtual region exist in some form (not necessary faulted-in. For example, some of those base pages could be in swap space and Linux will first fault them in then migrate them)
However, it is known that larger page sizes have higher internal fragmentation and thus lead to memory wastage. It's a trade off. But generally speaking, for modern systems, the overhead of managing memory in 4 KiB is very high and we are at a point where switching to 16/64 KiB is almost always a win. 2 MiB is still a bit of a stretch, though, but transparent 2 MiB pages for heap memory is enabled by default on most major Linux distributions, aka THP [2]
Source: my PhD is on memory management and address translation on large memory systems, having worked both on hardware architecture of address translation and TLBs as well as the Linux kernel. I'm happy to talk about this all day!
[1] https://blogs.vmware.com/vsphere/2020/03/how-is-virtual-memo... [2] https://docs.kernel.org/admin-guide/mm/transhuge.html
An immigrant has the right to live a life with dignity and not be deprived from human experience and oppressed and exploited just to have a chance to stay in the country and get a visa. What's shocking to me is that you think such a person is stupid!! Are you okay?
In this case, it is indeed novel to run the logic of the filesystem on the GPU itself. It's definitely worth the investigation!
1) How does this work differ from Mark Silberstein's GPUfs from 2014 [1]?
2) Does this work assume the storage device is only accessed by the GPU? Otherwise, how do you guarantee consistency when multiple processes can map, read and write the same files? You mention POSIX. POSIX has MAP_SHARED. How is this situation handled?
3) Related to (2), on the device level, how do you sync CPU (on an SMP, multiple cores) and GPU accesses?
There is a pause from 12pm to 2pm.
Like many Mediterranean cultures, the people like to appreciate family/friends time and food and they always make sure to make those a priority. In other terms, not rich, but chill laid off people.
Overwork culture have no place and society doesn't encourage that in general. In my opinion, for two reasons 1) it's not a competitive society as in China or India, as there is enough resources for everyone. 2) Hard work is not properly rewarded as in the USA/EU, as the country suffers from corruption and it has failed to develop a modern meritocratic economy, so far.
For the compression part, have you thought about OS-managed memory compression [3][4]?
[1] https://google.github.io/tcmalloc/temeraire.html
[2] https://people.freebsd.org/~jasone/jemalloc/bsdcan2006/jemal...
Edit: fixed typo
[1] https://docs.kernel.org/core-api/xarray.html
[2] https://elixir.bootlin.com/linux/latest/source/include/linux...
[3] https://elixir.bootlin.com/linux/latest/source/mm/page-write...
[4] https://elixir.bootlin.com/linux/latest/source/mm/page-write...
When I started contributing to the kernel, it was super painful and I failed multiple times. I got super harsh comments (someone called me "retard. It was fun, I laughed, eventually part of my work gor merged) but I always respected the maintainers and I was eager to better myself and improve my analytical and development skills with an open mind to be as sharp as the senior hackers. I always looked up to them and never thought in the same way the newbie did when my patches got re-written or dismissed. I just considered myself "not good enough" and I felt "I had to work harder and smarter".
Benjamin Franklin was very worried about German immigrants in the US and he described them as "less intelligent", "aliens" and that they won't assimilate. Fast forward few decades later/centries later, Germans are one of the most successful immigrants group in the US, industrialising the country, creating financial institutions, and becoming military and political leaders, giving US presidents and generals. Recently, Asian immigrants created Silicon companies. One of them is a trillion dollar company called Nvidia.
France has a huge success story with immigrants as well, the poles (Marie Curie), the Italians, the Portuguese, North Africans, etc.
There are certain issues here and there, especially with unregulated modern mass migration, but in my opinion, that's not a true representation of real immigration that has always happened since the beginning of time.
The fact that Sweden has integration issues with mass migration from war-torn Syria is a special case.