From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
Vegard Nossum <vegard.nossum@gmail.com>,
linux-mm@kvack.org
Subject: Re: swapon/swapoff in a loop -- ever-decreasing priority field
Date: Sat, 12 Jul 2008 15:28:39 +0900 [thread overview]
Message-ID: <20080712152050.F69F.KOSAKI.MOTOHIRO@jp.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0807112214240.25357@blonde.site>
> On Fri, 11 Jul 2008, KOSAKI Motohiro wrote:
> > >
> > > I find that running swapon/swapoff in a loop will decrement the
> > > "Priority" field of the swap partition once per iteration. This
> > > doesn't seem quite correct, as it will eventually lead to an
> > > underflow.
> > >
> > > (Though, by my calculations, it would take around 620 days of constant
> > > swapoff/swapon to reach this condition, so it's hardly a real-life
> > > problem.)
> > >
> > > Is this something that should be fixed, though?
> >
> > I am not sure about your intention.
> > Do following patch fill your requirement?
>
> I believe that only handles a simple swapon/swapoff of one area:
> once you have a pair of them (which is very useful for swapoff
> testing: swapon Y before swapoff X so you can be sure there will
> be enough space) their priorities will again decrement indefinitely.
> Here's my version...
Yeah, I ignored intentionally its corner case.
I thought it is artificial issue, not real problem.
but yes, two swap test should be allowed.
your patch is better, of cource.
it works well on my sevarl test and I found no bug in my review.
Thanks!
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
--
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>
prev parent reply other threads:[~2008-07-12 6:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-10 10:54 Vegard Nossum
2008-07-11 3:17 ` KOSAKI Motohiro
2008-07-11 21:25 ` Hugh Dickins
2008-07-12 6:28 ` KOSAKI Motohiro [this message]
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=20080712152050.F69F.KOSAKI.MOTOHIRO@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=hugh@veritas.com \
--cc=linux-mm@kvack.org \
--cc=vegard.nossum@gmail.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