From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: "\"Daniel Sp蚣g\"" <daniel.spang@gmail.com>
Cc: kosaki.motohiro@jp.fujitsu.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Marcelo Tosatti <marcelo@kvack.org>,
Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [RFC][PATCH 3/8] mem_notify v5: introduce /dev/mem_notify new device (the core of this patch series)
Date: Fri, 25 Jan 2008 12:33:14 +0900 [thread overview]
Message-ID: <20080125121032.1AAE.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <cfd9edbf0801240419t669c9d9cl4cf0f821599fc7ad@mail.gmail.com>
Hi Daniel
> > +#define PROC_WAKEUP_GUARD (10*HZ)
> [...]
> > + timeout = info->last_proc_notify + PROC_WAKEUP_GUARD;
>
> If only one or a few processes are using the system I think 10 seconds
> is a little long time to wait before they get the notification again.
> Can we decrease this value? Or make it configurable under /proc? Or
> make it lower with fewer users? Something like:
Oh, that is very interesting issue.
tank you good point out.
after deep thinking, I understand my current implementation is fully stupid.
current, worst case is below.
1. low end
- many process of used only a bit memory(sh, cp etc..) exist.
- 1 memory eater process exist(may be, it is fat browser)
and it watching /dev/mem_notify.
2. high end
- many process of used only a bit memory(sh, cp etc..) exist.
- 1 memory eater process exist(may be, it is DB)
and it watching /dev/mem_notify.
the point is "only 1 process watch /dev/mem_notify", but not a few processor.
I fix it with pleasure.
> timeout = info->last_proc_notify + min(mem_notify_users, PROC_WAKEUP_GUARD);
I like this formula.
the rest problem is decide to default value when only 1 process watch /dev/mem_notify.
What do you think it?
and if my low end worst case situation doesn't match yours,
Could you please explain your usage more?
BTW:
end up, We will add /proc configuration the future.
but I think it is too early.
sometimes configrable parameter prevent the discussion of nicer default value.
Instead, I hope the default value changed by adjust your usage.
- kosaki
--
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-25 3:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 4:18 [RFC][PATCH 0/8] mem_notify v5 KOSAKI Motohiro
2008-01-24 4:19 ` [RFC][PATCH 1/8] mem_notify v5: introduce poll_wait_exclusive() new API KOSAKI Motohiro
2008-01-24 4:20 ` [RFC][PATCH 2/8] mem_notify v5: introduce wake_up_locked_nr() " KOSAKI Motohiro
2008-01-24 4:21 ` [RFC][PATCH 3/8] mem_notify v5: introduce /dev/mem_notify new device (the core of this patch series) KOSAKI Motohiro
2008-01-24 12:19 ` Daniel Spång
2008-01-25 3:33 ` KOSAKI Motohiro [this message]
2008-01-24 4:22 ` [RFC][PATCH 4/8] mem_notify v5: memory_pressure_notify() caller KOSAKI Motohiro
2008-01-24 4:22 ` [RFC][PATCH 5/8] mem_notify v5: add new mem_notify field to /proc/zoneinfo KOSAKI Motohiro
2008-01-24 4:23 ` [RFC][PATCH 6/8] mem_notify v5: (optional) fixed incorrect shrink_zone KOSAKI Motohiro
2008-01-24 4:24 ` [RFC][PATCH 7/8] mem_notify v5: ignore very small zone for prevent incorrect low mem notify KOSAKI Motohiro
2008-01-24 4:26 ` [RFC][PATCH 8/8] mem_notify v5: support fasync feature 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=20080125121032.1AAE.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=daniel.spang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=marcelo@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