[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <51C36E91.2020509@mozilla.com>
Date: Thu, 20 Jun 2013 17:05:21 -0400
From: Dhaval Giani <dgiani@...illa.com>
To: John Stultz <john.stultz@...aro.org>
CC: LKML <linux-kernel@...r.kernel.org>,
Minchan Kim <minchan@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Android Kernel Team <kernel-team@...roid.com>,
Robert Love <rlove@...gle.com>, Mel Gorman <mel@....ul.ie>,
Hugh Dickins <hughd@...gle.com>,
Dave Hansen <dave@...ux.vnet.ibm.com>,
Rik van Riel <riel@...hat.com>,
Dmitry Adamushko <dmitry.adamushko@...il.com>,
Dave Chinner <david@...morbit.com>, Neil Brown <neilb@...e.de>,
Andrea Righi <andrea@...terlinux.com>,
Andrea Arcangeli <aarcange@...hat.com>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
Mike Hommey <mh@...ndium.org>, Taras Glek <tglek@...illa.com>,
Jan Kara <jack@...e.cz>,
KOSAKI Motohiro <kosaki.motohiro@...il.com>,
Michel Lespinasse <walken@...gle.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH 5/8] vrange: Add new vrange(2) system call
On 2013-06-12 12:22 AM, John Stultz wrote:
> From: Minchan Kim <minchan@...nel.org>
>
> This patch adds new system call sys_vrange.
>
> NAME
> vrange - Mark or unmark range of memory as volatile
>
> SYNOPSIS
> int vrange(unsigned_long start, size_t length, int mode,
> int *purged);
>
> DESCRIPTION
> Applications can use vrange(2) to advise the kernel how it should
> handle paging I/O in this VM area. The idea is to help the kernel
> discard pages of vrange instead of reclaiming when memory pressure
> happens. It means kernel doesn't discard any pages of vrange if
> there is no memory pressure.
>
> mode:
> VRANGE_VOLATILE
> hint to kernel so VM can discard in vrange pages when
> memory pressure happens.
> VRANGE_NONVOLATILE
> hint to kernel so VM doesn't discard vrange pages
> any more.
>
> If user try to access purged memory without VRANGE_NOVOLATILE call,
> he can encounter SIGBUS if the page was discarded by kernel.
I wonder if it would be possible to provide additional information here,
for example "purge range at a time" as opposed to "purge page at a
time". There are some valid use cases for both approaches and it doesn't
make sense to deny one use case.
Thanks!
Dhaval
--
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