lkml.org 
[lkml]   [2012]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 1/3] /dev/low_mem_notify
On 01/19/2012 11:10 AM, Pekka Enberg wrote:
> On Thu, Jan 19, 2012 at 11:05 AM, Ronen Hod<rhod@redhat.com> wrote:
>>>> I believe that it will be best if the kernel publishes an ideal
>>>> number_of_free_pages (in /proc/meminfo or whatever). Such number is easy to
>>>> work with since this is what applications do, they free pages. Applications
>>>> will be able to refer to this number from their garbage collector, or before
>>>> allocating memory also if they did not get a notification, and it is also
>>>> useful if several applications free memory at the same time.
>>> Isn't
>>>
>>> /proc/sys/vm/min_free_kbytes
>>>
>>> pretty much just that?
>> Would you suggest to use min_free_kbytes as the threshold for sending
>> low_memory_notifications to applications, and separately as a target value
>> for the applications' memory giveaway?
> I'm not saying that the kernel should use it directly but it seems
> like the kind of "ideal number of free pages" threshold you're
> suggesting. So userspace can read that value and use it as the "number
> of free pages" threshold for VM events, no?

Yes, I like it. The rules of the game are simple and consistent all over, be it the alert threshold, voluntary poling by the apps, and for concurrent work by several applications.
Well, as long as it provides a good indication for low_mem_pressure.

Thanks, Ronen.

>
> Pekka



\
 
 \ /
  Last update: 2012-01-19 10:23    [W:1.567 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site