Re: [PATCH v19 1/5] mm: add VM_DROPPABLE for designating always lazily freeable mappings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Andrew,

On Tue, Jul 02, 2024 at 12:42:54AM -0700, Andrew Morton wrote:
> The patch is impressively comment-free.  It is a little harsh to make
> readers go poking around in the git history to figure out what
> VM_DROPPABLE is, and why it exists.

Sure, I'll add some comments to the conditionals added to make it more
clear.

> Seems hard to test that this mode is working correctly.  Can you think
> of a way for userspace to check this?  And if so, add it to selftests?

I've got a pretty straight forward test I've been using during my own
testing that I can add to the vgetrandom_alloc() selftest (which exposes
these code paths). It works fairly reliably. Basically, one process
keeps checking to see if the memory has been dropped, while the other
consumes memory a page at a time. Pretty soon (depending on how much ram
you have), the memory gets dropped, and this is detected, and the test
completes with a pass. I'll have this in v+1 of this series.

Jason




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux