From: Hugh Dickins <hughd@google.com>
To: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
linux-mm@kvack.org
Subject: Re: [PATCH 2/3] mm: cond_resched in scan_mapping_unevictable_pages
Date: Wed, 28 Dec 2011 21:48:51 -0800 (PST) [thread overview]
Message-ID: <alpine.LSU.2.00.1112282142360.2405@eggly.anvils> (raw)
In-Reply-To: <4EFBF732.1070303@gmail.com>
On Thu, 29 Dec 2011, KOSAKI Motohiro wrote:
> (12/28/11 11:36 PM), Hugh Dickins wrote:
> > scan_mapping_unevictable_pages() is used to make SysV SHM_LOCKed pages
> > evictable again once the shared memory is unlocked or destroyed (the
> > latter seems rather a waste of time, but meets internal expectations).
> > It does pagevec_lookup()s across the whole object: methinks a
> > cond_resched() every PAGEVEC_SIZE pages would be worthwhile.
> >
> > Signed-off-by: Hugh Dickins<hughd@google.com>
> > ---
> > mm/vmscan.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > --- mmotm.orig/mm/vmscan.c 2011-12-28 16:49:36.000000000 -0800
> > +++ mmotm/mm/vmscan.c 2011-12-28 17:03:07.647220248 -0800
> > @@ -3583,8 +3583,8 @@ void scan_mapping_unevictable_pages(stru
> > pagevec_release(&pvec);
> >
> > count_vm_events(UNEVICTABLE_PGSCANNED, pg_scanned);
> > + cond_resched();
> > }
>
> Hmm...
> scan_mapping_unevictable_pages() is always under spinlock?
Yikes, how dreadful! Dreadful that it's like that, and dreadful
that I didn't notice. Many thanks for spotting, consider this
patch summarily withdrawn. All the more need for some patch like
this, but no doubt it was "easier" to do it all under the spinlock,
so the right replacement patch may not be so obvious.
Thanks again,
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>
next prev parent reply other threads:[~2011-12-29 5:49 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 4:32 [PATCH 0/3] mm: three minor vmscan improvements Hugh Dickins
2011-12-29 4:35 ` [PATCH 1/3] mm: test PageSwapBacked in lumpy reclaim Hugh Dickins
2011-12-29 5:06 ` KOSAKI Motohiro
2012-01-04 1:23 ` Minchan Kim
2012-01-05 6:03 ` KAMEZAWA Hiroyuki
2011-12-29 4:36 ` [PATCH 2/3] mm: cond_resched in scan_mapping_unevictable_pages Hugh Dickins
2011-12-29 5:14 ` KOSAKI Motohiro
2011-12-29 5:48 ` Hugh Dickins [this message]
2011-12-29 22:46 ` Hugh Dickins
2011-12-29 4:39 ` [PATCH 3/3] mm: take pagevecs off reclaim stack Hugh Dickins
2011-12-29 5:42 ` KOSAKI Motohiro
2011-12-29 11:18 ` Konstantin Khlebnikov
2011-12-29 22:20 ` Hugh Dickins
2011-12-29 22:55 ` Andrew Morton
2011-12-29 23:27 ` Hugh Dickins
2011-12-30 0:24 ` KOSAKI Motohiro
2011-12-30 1:55 ` Hugh Dickins
2011-12-30 3:59 ` Andrew Morton
2011-12-30 15:51 ` Mel Gorman
2012-01-01 7:18 ` Hugh Dickins
2012-01-03 23:12 ` Andrew Morton
2012-01-03 23:17 ` KOSAKI Motohiro
2012-01-03 23:29 ` Andrew Morton
2012-01-04 0:03 ` KOSAKI Motohiro
2012-01-04 3:22 ` Hugh Dickins
2012-01-04 20:20 ` Andrew Morton
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.1112282142360.2405@eggly.anvils \
--to=hughd@google.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@gmail.com \
--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