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] [day] [month] [year] [list]
Date:	Mon, 27 May 2013 17:24:13 +0900
From:	Minchan Kim <minchan@...nel.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Rik van Riel <riel@...hat.com>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	Dave Hansen <dave.hansen@...el.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Minkyung Kim <minkyung88@....com>
Subject: Re: [PATCH v5 6/7] mm: Support address range reclaim

On Tue, May 21, 2013 at 05:33:32PM -0700, Andrew Morton wrote:
> On Thu,  9 May 2013 16:21:28 +0900 Minchan Kim <minchan@...nel.org> wrote:
> 
> > This patch adds address range reclaim of a process.
> > The requirement is following as,
> > 
> > Like webkit1, it uses a address space for handling multi tabs.
> > IOW, it uses *one* process model so all tabs shares address space
> > of the process. In such scenario, per-process reclaim is rather
> > coarse-grained so this patch supports more fine-grained reclaim
> > for being able to reclaim target address range of the process.
> > For reclaim target range, you should use following format.
> > 
> > 	echo [addr] [size-byte] > /proc/pid/reclaim
> > 
> > The addr should be page-aligned.
> > 
> > So now reclaim konb's interface is following as.
> > 
> > echo file > /proc/pid/reclaim
> > 	reclaim file-backed pages only
> > 
> > echo anon > /proc/pid/reclaim
> > 	reclaim anonymous pages only
> > 
> > echo all > /proc/pid/reclaim
> > 	reclaim all pages
> > 
> > echo 0x100000 8K > /proc/pid/reclaim
> > 	reclaim pages in (0x100000 - 0x102000)
> 
> This might be going a bit far.  The application itself can be modified
> to use fadvise/madvise/whatever to release unused pages and that's a
> better interface.

I agree. The webkit should be smarter and it's going on afaik but
let's think another usecase that makes snapshot image scenario
I mentioned in previous reply.

Admin should discard NOT-IMPORTANT pages without modifying application's
code.

In addition, maybe we need madvise(MADV_SWAPOUT_NOT_DONTNEED) for
anonymous pages if we don't have such feature.

> 
> Athough it's a bit of a pipe-dream, I do think we should encourage
> userspace to go this path, rather than providing ways for hacky admin
> tools to go poking around in /proc/pid/maps and whacking apps
> externally.
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>

-- 
Kind regards,
Minchan Kim
--
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