Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1325996

Re: [PATCH] mm/workingset: do not forget to unlock page

From Johannes Weiner <hannes@cmpxchg.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mm/workingset: do not forget to unlock page
Date 2016-02-03 23:10 +0100
Message-ID <qYdMC-7MT-21@gated-at.bofh.it> (permalink)
References <qY2o9-hJ-9@gated-at.bofh.it> <qY3ay-Nu-15@gated-at.bofh.it> <qY8tz-4kE-1@gated-at.bofh.it> <qYd0e-7f0-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 03, 2016 at 01:19:39PM -0800, Andrew Morton wrote:
> Yup.  I turned it into a fix against
> mm-workingset-per-cgroup-cache-thrash-detection.patch, which is where
> the bug was added.  And I did the goto thing instead, so the final
> result will be
> 
> void workingset_activation(struct page *page)
> {
> 	struct lruvec *lruvec;
> 
> 	lock_page_memcg(page);
> 	/*
> 	 * Filter non-memcg pages here, e.g. unmap can call
> 	 * mark_page_accessed() on VDSO pages.
> 	 *
> 	 * XXX: See workingset_refault() - this should return
> 	 * root_mem_cgroup even for !CONFIG_MEMCG.
> 	 */
> 	if (!mem_cgroup_disabled() && !page_memcg(page))
> 		goto out;
> 	lruvec = mem_cgroup_zone_lruvec(page_zone(page), page_memcg(page));
> 	atomic_long_inc(&lruvec->inactive_age);
> out:
> 	unlock_page_memcg(page);
> }

LGTM, thank you.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mm/workingset: do not forget to unlock page Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-02-03 11:00 +0100
  Re: [PATCH] mm/workingset: do not forget to unlock page Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-02-03 11:50 +0100
    Re: [PATCH] mm/workingset: do not forget to unlock page Johannes Weiner <hannes@cmpxchg.org> - 2016-02-03 17:30 +0100
      Re: [PATCH] mm/workingset: do not forget to unlock page Andrew Morton <akpm@linux-foundation.org> - 2016-02-03 22:20 +0100
        Re: [PATCH] mm/workingset: do not forget to unlock page Johannes Weiner <hannes@cmpxchg.org> - 2016-02-03 23:10 +0100
          Re: [PATCH] mm/workingset: do not forget to unlock page Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-02-04 01:20 +0100

csiph-web