linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
	Minchan Kim <minchan.kim@gmail.com>,
	Rik van Riel <riel@redhat.com>, Shaohua Li <shaohua.li@intel.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michel Lespinasse <walken@google.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/2] SHM_UNLOCK: fix long unpreemptible section
Date: Wed, 18 Jan 2012 15:26:51 -0800 (PST)	[thread overview]
Message-ID: <alpine.LSU.2.00.1201181457450.1256@eggly.anvils> (raw)
In-Reply-To: <20120118143718.663b8cf5.akpm@linux-foundation.org>

On Wed, 18 Jan 2012, Andrew Morton wrote:
> On Sat, 14 Jan 2012 16:18:43 -0800 (PST)
> Hugh Dickins <hughd@google.com> wrote:
> 
> > scan_mapping_unevictable_pages() is used to make SysV SHM_LOCKed pages
> > evictable again once the shared memory is unlocked.  It does this with
> > pagevec_lookup()s across the whole object (which might occupy most of
> > memory), and takes 300ms to unlock 7GB here.  A cond_resched() every
> > PAGEVEC_SIZE pages would be good.
>... 
> Is -stable backporting really warranted?  AFAICT the only thing we're
> fixing here is a long latency glitch during a rare operation on large
> machines.  Usually it will be on only one CPU, too.

True: I'm not sure if it amounts to -stable material or not.
I see you've taken out its Cc: stable line: that's fine by me, but...

> "[PATCH 2/2] SHM_UNLOCK: fix Unevictable pages stranded after swap"
> does loko like -stable material, so omitting 1/1 will probably screw
> things up :(

Sort of, but they both(?) needed respinning for -stable anyway.
Even against 3.2, there's some little change in vmscan.c that generates
a reject.  Greg has now closed down 3.1.N (which would have been tiresome
to port to, because it was still supporting a second caller of check_move),
and by your argument above it's not worth porting 1/2 back to 2.6.32.  So
I think 2/2 can just go into 3.2.N, dragging 1/2 along in its slipstream
(if you can have a slipstream in front of you).

I ordered them that way because 1/2 fixes an old, and 2/2 a recent, bug.

> > Resend in the hope that it can get into 3.3.
> 
> That we can do ;)

Thank you!

> > +#else
> > +void scan_mapping_unevictable_pages(struct address_space *mapping)
> > +{
> > +}
> > +#endif /* CONFIG_SHMEM */
> 
> Inlining the CONFIG_SHMEM=n stub would have been mroe efficient.

True, though in 2/2 it morphs into shmem_unlock_mapping() over
in shmem.c, and we seem to have the convention that TINY's !SHMEM
stubs live as non-inline functions there - probably no good reason
for that, just reflects their historical origins in tiny-shmem.c.
A grand saving to make some other time ;)

Hugh

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2012-01-18 23:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06 21:10 Hugh Dickins
2012-01-06 21:12 ` [PATCH 2/2] SHM_UNLOCK: fix Unevictable pages stranded after swap Hugh Dickins
2012-01-09 20:42   ` KOSAKI Motohiro
2012-01-09 22:25     ` Hugh Dickins
2012-01-09 23:09       ` KOSAKI Motohiro
2012-01-09 23:56         ` Hugh Dickins
2012-01-15  0:20   ` Hugh Dickins
2012-01-07  8:28 ` [PATCH 1/2] SHM_UNLOCK: fix long unpreemptible section KOSAKI Motohiro
2012-01-15  0:18 ` Hugh Dickins
2012-01-18 22:37   ` Andrew Morton
2012-01-18 23:26     ` Hugh Dickins [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=alpine.LSU.2.00.1201181457450.1256@eggly.anvils \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=eric.dumazet@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=riel@redhat.com \
    --cc=shaohua.li@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=walken@google.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