Re: [RFC 1/3] /dev/low_mem_notify

From: Marcelo Tosatti
Date: Thu Jan 26 2012 - 11:20:24 EST


> >it should free for each notification received, that is, its part?
> >
> >Its easier if there is a goal, a hint of how many pages the process
> >should release.
>
> I have to agree.
> Still, the amount of memory that an app should free per memory-pressure-level can be best calculated inside the application (based on comfortable_free_pages relative to process RSS, as you suggested).

It is easier if the kernel calculates the target (the application is
free to ignore the hint, of course), because it depends on information
not readily available in userspace.

> Fairness is also an issue.
> And, if in the meantime the memory pressure ended, would you recommend that the application will continue with its work?

There appears to be interest in an event to notify that higher levels
of memory are available (see Leonid's email).

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/