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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Jan 2012 16:49:30 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Pekka Enberg <penberg@...nel.org>
Cc:	Rik van Riel <riel@...hat.com>, linux-mm <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>, leonid.moiseichuk@...ia.com,
	kamezawa.hiroyu@...fujitsu.com, mel@....ul.ie, rientjes@...gle.com,
	KOSAKI Motohiro <kosaki.motohiro@...il.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Marcelo Tosatti <mtosatti@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Ronen Hod <rhod@...hat.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: Re: [RFC 1/3] /dev/low_mem_notify

On Wed, Jan 18, 2012 at 09:16:49AM +0200, Pekka Enberg wrote:
> On Wed, 18 Jan 2012, Minchan Kim wrote:
> >I didn't look into your code(will do) but as I read description,
> >still I don't convince we need really some process specific threshold like 99%
> >I think application can know it by polling /proc/meminfo without this mechanism
> >if they really want.
> 
> I'm not sure if we need arbitrary threshold either. However, we need
> to support the following cases:
> 
>   - We're about to swap
> 
>   - We're about to run out of memory
> 
>   - We're about to start OOM killing
> 
> and I don't think your patch solves that. One possibility is to implement:

I think my patch can extend it but your ABI looks good to me than my approach.

> 
>   VMNOTIFY_TYPE_ABOUT_TO_SWAP
>   VMNOTIFY_TYPE_ABOUT_TO_OOM
>   VMNOTIFY_TYPE_ABOUT_TO_OOM_KILL

Yes. We can define some levels.

1. page cache reclaim
2. code page reclaim
3. anonymous page swap out
4. OOM kill.


Application might handle it differenlty by the memory pressure level.

> 
> and maybe rip out support for arbitrary thresholds. Does that more
> reasonable?

Currently, Nokia people seem to want process specific thresholds so 
we might need it.

> 
> As for polling /proc/meminfo, I'd much rather deliver stats as part
> of vmnotify_read() because it's easier to extend the ABI rather than
> adding new fields to /proc/meminfo.

Agree.

> 
> On Wed, 18 Jan 2012, Minchan Kim wrote:
> >I would like to notify when system has a trobule with memory pressure without
> >some process specific threshold. Of course, applicatoin can't expect it.(ie,
> >application can know system memory pressure by /proc/meminfo but it can't know
> >when swapout really happens). Kernel low mem notify have to give such notification
> >to user space, I think.
> 
> It should be simple to add support for VMNOTIFY_TYPE_MEM_PRESSURE
> that uses your hooks.

Indeed.

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