linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Single Owner Memory
@ 2023-02-20 19:10 Pasha Tatashin
  2023-02-21 13:46 ` Matthew Wilcox
  2023-02-21 15:55 ` Matthew Wilcox
  0 siblings, 2 replies; 9+ messages in thread
From: Pasha Tatashin @ 2023-02-20 19:10 UTC (permalink / raw)
  To: lsf-pc; +Cc: linux-mm

Hello,

I would like to propose the following topic for this year's LSF/MM/BPF:

Single Owner Memory (som): A type of anonymous memory that is never shared.

Within Google the vast majority of memory, over 90% has a single
owner. This is because most of the jobs are not multi-process but
instead multi-threaded. The examples of single owner memory
allocations are all tcmalloc()/malloc() allocations, and
mmap(MAP_ANONYMOUS | MAP_PRIVATE) allocations without forks. On the
other hand, the struct page metadata that is shared for all types of
memory takes 1.6% of the system memory. It would be reasonable to find
ways to optimize memory such that the common som case has a reduced
amount of metadata.

This would be similar to HugeTLB and DAX that are treated as special
cases, and can release struct pages for the subpages back to the
system.

The proposal is to discuss a new som driver that would use HugeTLB as
a source of 2M chunks. When user creates a som memory, i.e.:

mmap(MAP_ANONYMOUS | MAP_PRIVATE);
madvise(mem, length, MADV_DONTFORK);

A vma from the som driver is used instead of regular anon vma.

The discussion should include the following topics:
-  Interaction with folio and the proposed struct page {memdesc}.
- Handling for migrate_pages() and friends.
- Handling for FOLL_PIN and FOLL_LONGTERM.
- What type of madvise() properties the som memory should handle

Thanks,
Pasha


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-22 16:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 19:10 [LSF/MM/BPF TOPIC] Single Owner Memory Pasha Tatashin
2023-02-21 13:46 ` Matthew Wilcox
2023-02-21 14:37   ` Pasha Tatashin
2023-02-21 15:05     ` Matthew Wilcox
2023-02-21 17:16       ` Pasha Tatashin
2023-02-22 16:18         ` Matthew Wilcox
2023-02-22 16:40           ` Pasha Tatashin
2023-02-21 15:55 ` Matthew Wilcox
2023-02-21 17:20   ` Pasha Tatashin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox