lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080115134209.7b3c2f7e@lxorguk.ukuu.org.uk>
Date:	Tue, 15 Jan 2008 13:42:09 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Cc:	kosaki.motohiro@...fujitsu.com, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Marcelo Tosatti <marcelo@...ck.org>,
	Daniel Spang <daniel.spang@...il.com>,
	Rik van Riel <riel@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH 3/5] add /dev/mem_notify device

> 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.

Ok this makes sense.
> 
> 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.

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.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ