From: Marcelo Tosatti <marcelo@kvack.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Marcelo Tosatti <marcelo@kvack.org>,
Daniel Spang <daniel.spang@gmail.com>,
Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC][PATCH 3/5] add /dev/mem_notify device
Date: Tue, 15 Jan 2008 10:05:52 -0200 [thread overview]
Message-ID: <20080115120552.GA25009@dmt> (raw)
In-Reply-To: <20080115112027.6120915b@lxorguk.ukuu.org.uk>
Hi Alan,
On Tue, Jan 15, 2008 at 11:20:27AM +0000, Alan Cox wrote:
> On Tue, 15 Jan 2008 19:59:02 +0900
> KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
>
> >
> > > > the core of this patch series.
> > > > add /dev/mem_notify device for notification low memory to user process.
> > >
> > > As you only wake one process how would you use this API from processes
> > > which want to monitor and can free memory under load. Also what fairness
> > > guarantees are there...
> >
> > Sorry, I don't make sense what you mean fairness.
> > Could you tell more?
>
> If you have two processes each waiting on mem_notify is it not possible
> that one of them will keep being the one woken up and the other will
> remain stuck ?
Tasks are added to the end of waitqueue->task_list through
add_wait_queue_exclusive, and waken up from the start of the list. So
I don't think that can happen (its FIFO).
> It also appears there is no way to wait for memory shortages (processes
> that can free memory easily) only for memory to start appearing.
The notification is sent once the VM starts moving anonymous pages to
the inactive list (meaning there is memory shortage). So polling on the
device is all about waiting for memory shortage.
Or do you mean something else?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-01-15 12:05 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-15 0:52 [RFC][PATCH 0/5] mem notifications v4 KOSAKI Motohiro
2008-01-15 0:59 ` [RFC][PATCH 1/5] introduce poll_wait_exclusive() new API KOSAKI Motohiro
2008-01-15 1:00 ` [RFC][PATCH 2/5] introduce wake_up_locked_nr() " KOSAKI Motohiro
2008-01-15 1:01 ` [RFC][PATCH 3/5] add /dev/mem_notify device KOSAKI Motohiro
2008-01-15 1:08 ` Randy Dunlap
2008-01-15 1:20 ` KOSAKI Motohiro
2008-01-15 1:24 ` KOSAKI Motohiro
2008-01-15 2:10 ` KAMEZAWA Hiroyuki
2008-01-15 2:20 ` KOSAKI Motohiro
2008-01-15 2:56 ` Rik van Riel
2008-01-15 10:46 ` Alan Cox
2008-01-15 10:59 ` KOSAKI Motohiro
2008-01-15 11:20 ` Alan Cox
2008-01-15 11:48 ` KOSAKI Motohiro
2008-01-15 13:42 ` Alan Cox
2008-01-16 2:43 ` KOSAKI Motohiro
2008-01-15 12:05 ` Marcelo Tosatti [this message]
2008-01-15 13:42 ` Alan Cox
2008-01-15 22:16 ` Pavel Machek
2008-01-16 1:57 ` KOSAKI Motohiro
2008-01-16 4:13 ` Marcelo Tosatti
2008-01-16 11:42 ` Pavel Machek
2008-01-16 11:51 ` Daniel Spång
2008-01-17 3:04 ` KOSAKI Motohiro
2008-01-15 1:02 ` [RFC][PATCH 4/5] memory_pressure_notify() caller KOSAKI Motohiro
2008-01-15 2:06 ` KAMEZAWA Hiroyuki
2008-01-15 2:37 ` KOSAKI Motohiro
2008-01-15 3:00 ` KAMEZAWA Hiroyuki
2008-01-15 3:08 ` KOSAKI Motohiro
2008-01-15 22:55 ` Daniel Spång
2008-01-15 22:59 ` Rik van Riel
2008-01-15 23:39 ` Daniel Spång
2008-01-16 1:48 ` KOSAKI Motohiro
2008-01-16 11:03 ` Daniel Spång
2008-01-17 3:26 ` KOSAKI Motohiro
2008-01-18 10:24 ` Daniel Spång
2008-01-18 10:30 ` KOSAKI Motohiro
2008-01-15 1:03 ` [RFC][PATCH 5/5] /proc/zoneinfo enhancement KOSAKI Motohiro
2008-01-15 10:44 ` Alan Cox
2008-01-15 10:49 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080115120552.GA25009@dmt \
--to=marcelo@kvack.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=daniel.spang@gmail.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox