From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 16 Jan 2008 11:43:08 +0900 From: KOSAKI Motohiro Subject: Re: [RFC][PATCH 3/5] add /dev/mem_notify device In-Reply-To: <20080115134209.7b3c2f7e@lxorguk.ukuu.org.uk> References: <20080115202711.11A6.KOSAKI.MOTOHIRO@jp.fujitsu.com> <20080115134209.7b3c2f7e@lxorguk.ukuu.org.uk> Message-Id: <20080116114121.11B7.KOSAKI.MOTOHIRO@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Alan Cox Cc: kosaki.motohiro@jp.fujitsu.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Marcelo Tosatti , Daniel Spang , Rik van Riel , Andrew Morton List-ID: Hi Alan > > > 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. > > My misunderstanding. There is in fact no way to wait for memory to become > available. The poll() method you provide works nicely waiting for > shortages and responding to them by freeing memory. > > It would be interesting to add FASYNC support to this. Some users have > asked for a signal when memory shortage occurs (as IBM AIX provides > this). FASYNC support would allow a SIGIO to be delivered from this > device when memory shortages occurred. Poll as you have implemented is of > course the easier way for a program to monitor memory and a better > interface. OK. I will challenge implement at mem_notify v5. - 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: email@kvack.org