All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov@parallels.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.cz>, Vlastimil Babka <vbabka@suse.cz>,
	Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 2/2] mm: vmscan: init reclaim_state in do_try_to_free_pages
Date: Tue, 13 Jan 2015 10:55:57 +0300	[thread overview]
Message-ID: <20150113075557.GH2110@esperanza> (raw)
In-Reply-To: <20150112222634.GC25609@phnom.home.cmpxchg.org>

On Mon, Jan 12, 2015 at 05:26:34PM -0500, Johannes Weiner wrote:
> On Mon, Jan 12, 2015 at 12:30:38PM +0300, Vladimir Davydov wrote:
> > All users of do_try_to_free_pages() want to have current->reclaim_state
> > set in order to account reclaimed slab pages. So instead of duplicating
> > the reclaim_state initialization code in each call site, let's do it
> > directly in do_try_to_free_pages().
> 
> Couldn't this be contained in shrink_slab() directly?

I had considered this possibility, but finally rejected it, because

 - some slab pages can be reclaimed from shrink_lruvec (e.g.
   buffer_head's); there shouldn't be too many of them though

 - struct reclaim_state looks to me as a generic placeholder for lots of
   reclaim-related stuff, though currently it is only used for counting
   reclaimed slab pages, so IMO it should be initialized before starting
   reclaim

Both arguments are not rock-solid as you can see, so if you think we can
neglect them, I'll do.

Thanks,
Vladimir

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Davydov <vdavydov@parallels.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.cz>, Vlastimil Babka <vbabka@suse.cz>,
	Mel Gorman <mgorman@suse.de>, Rik van Riel <riel@redhat.com>,
	<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm 2/2] mm: vmscan: init reclaim_state in do_try_to_free_pages
Date: Tue, 13 Jan 2015 10:55:57 +0300	[thread overview]
Message-ID: <20150113075557.GH2110@esperanza> (raw)
In-Reply-To: <20150112222634.GC25609@phnom.home.cmpxchg.org>

On Mon, Jan 12, 2015 at 05:26:34PM -0500, Johannes Weiner wrote:
> On Mon, Jan 12, 2015 at 12:30:38PM +0300, Vladimir Davydov wrote:
> > All users of do_try_to_free_pages() want to have current->reclaim_state
> > set in order to account reclaimed slab pages. So instead of duplicating
> > the reclaim_state initialization code in each call site, let's do it
> > directly in do_try_to_free_pages().
> 
> Couldn't this be contained in shrink_slab() directly?

I had considered this possibility, but finally rejected it, because

 - some slab pages can be reclaimed from shrink_lruvec (e.g.
   buffer_head's); there shouldn't be too many of them though

 - struct reclaim_state looks to me as a generic placeholder for lots of
   reclaim-related stuff, though currently it is only used for counting
   reclaimed slab pages, so IMO it should be initialized before starting
   reclaim

Both arguments are not rock-solid as you can see, so if you think we can
neglect them, I'll do.

Thanks,
Vladimir

  reply	other threads:[~2015-01-13  7:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12  9:30 [PATCH -mm 1/2] mm: vmscan: account slab pages on memcg reclaim Vladimir Davydov
2015-01-12  9:30 ` Vladimir Davydov
2015-01-12  9:30 ` [PATCH -mm 2/2] mm: vmscan: init reclaim_state in do_try_to_free_pages Vladimir Davydov
2015-01-12  9:30   ` Vladimir Davydov
2015-01-12 22:26   ` Johannes Weiner
2015-01-12 22:26     ` Johannes Weiner
2015-01-13  7:55     ` Vladimir Davydov [this message]
2015-01-13  7:55       ` Vladimir Davydov
2015-01-12 22:18 ` [PATCH -mm 1/2] mm: vmscan: account slab pages on memcg reclaim Johannes Weiner
2015-01-12 22:18   ` Johannes Weiner
2015-01-13  7:46   ` Vladimir Davydov
2015-01-13  7:46     ` Vladimir Davydov
2015-01-15 13:17 ` Michal Hocko
2015-01-15 13:17   ` Michal Hocko

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=20150113075557.GH2110@esperanza \
    --to=vdavydov@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.com \
    --cc=vbabka@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.