Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758188AbYAPCoE (ORCPT ); Tue, 15 Jan 2008 21:44:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753397AbYAPCnx (ORCPT ); Tue, 15 Jan 2008 21:43:53 -0500 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:47455 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752023AbYAPCnw (ORCPT ); Tue, 15 Jan 2008 21:43:52 -0500 Date: Wed, 16 Jan 2008 11:43:08 +0900 From: KOSAKI Motohiro To: Alan Cox Subject: Re: [RFC][PATCH 3/5] add /dev/mem_notify device Cc: kosaki.motohiro@jp.fujitsu.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Marcelo Tosatti , Daniel Spang , Rik van Riel , Andrew Morton 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 X-Mailer: Becky! ver. 2.42 [ja] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1172 Lines: 31 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/