Thread (40 messages) 40 messages, 8 authors, 2008-01-18

Re: [RFC][PATCH 3/5] add /dev/mem_notify device

From: KOSAKI Motohiro <hidden>
Date: 2008-01-15 11:48:58
Also in: lkml

Hi Alan

thank you for kindfull explain.
quoted
quoted
quoted
the core of this patch series.
add /dev/mem_notify device for notification low memory to user process.
As you only wake one process how would you use this API from processes
which want to monitor and can free memory under load. Also what fairness
guarantees are there...
Sorry, I don't make sense what you mean fairness.
Could you tell more?
If you have two processes each waiting on mem_notify is it not possible
that one of them will keep being the one woken up and the other will
remain stuck ?
current wake up order is simply FIFO by poll(2) called.
because the VM cannot know how much amount each process can do in free.
the process rss and freeable memory is not proportional.

thus I adopt wake up one after another until restoration memory shortage.

It also appears there is no way to wait for memory shortages (processes
that can free memory easily) only for memory to start appearing.
poll() with never timeout don't fill your requirement?
to be honest, maybe I don't understand your afraid yet. sorry.


-kosaki


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help