All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/2] pass the scan_control into shrinkers
@ 2011-04-25 17:22 Ying Han
  2011-04-25 17:22 ` [PATCH V2 1/2] change the shrink_slab by passing shrink_control Ying Han
  2011-04-25 17:22 ` [PATCH V2 2/2] change shrinker API by passing shrink_control struct Ying Han
  0 siblings, 2 replies; 20+ messages in thread
From: Ying Han @ 2011-04-25 17:22 UTC (permalink / raw)
  To: Nick Piggin, KOSAKI Motohiro, Minchan Kim, Daisuke Nishimura,
	Balbir Singh, Tejun Heo, Pavel Emelyanov, KAMEZAWA Hiroyuki,
	Andrew Morton, Li Zefan, Mel Gorman, Rik van Riel,
	Johannes Weiner, Hugh Dickins, Michal Hocko, Dave Hansen,
	Zhu Yanhai
  Cc: linux-mm

This patch changes the shrink_slab and shrinker APIs by consolidating existing
parameters into shrink_control struct. This simplifies any further attempts to
pass extra info to the shrinker. Instead of modifying all the shrinker files
each time, we just need to extend the shrink_control struct.

This patch is based on mmotm-2011-03-31-14-48.

Ying Han (2):
  change the shrink_slab by passing shrink_control
  change shrinker API by passing shrink_control struct

 arch/x86/kvm/mmu.c                   |    3 +-
 drivers/gpu/drm/i915/i915_gem.c      |    5 +--
 drivers/gpu/drm/ttm/ttm_page_alloc.c |    4 ++-
 drivers/staging/zcache/zcache.c      |    5 +++-
 fs/dcache.c                          |    8 +++++-
 fs/drop_caches.c                     |    6 ++++-
 fs/gfs2/glock.c                      |    5 +++-
 fs/inode.c                           |    6 ++++-
 fs/mbcache.c                         |   10 +++++---
 fs/nfs/dir.c                         |    5 +++-
 fs/nfs/internal.h                    |    2 +-
 fs/quota/dquot.c                     |    5 +++-
 fs/xfs/linux-2.6/xfs_buf.c           |    4 +-
 fs/xfs/linux-2.6/xfs_sync.c          |    5 ++-
 fs/xfs/quota/xfs_qm.c                |    7 +++--
 include/linux/mm.h                   |   28 ++++++++++++++++------
 mm/vmscan.c                          |   41 ++++++++++++++++++++++++----------
 net/sunrpc/auth.c                    |    4 ++-
 18 files changed, 107 insertions(+), 46 deletions(-)

-- 
1.7.3.1

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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [PATCH V2 2/2] change shrinker API by passing shrink_control struct
@ 2011-05-20  2:59 ` KOSAKI Motohiro
  0 siblings, 0 replies; 20+ messages in thread
From: KOSAKI Motohiro @ 2011-05-20  2:59 UTC (permalink / raw)
  To: linux-mm, yinghan, linux-kernel; +Cc: kosaki.motohiro

> Hmm, got Nick's email wrong.
> 
> --Ying

Ping.
Can you please explain current status? When I can see your answer?



> 
> On Tue, Apr 26, 2011 at 6:15 PM, Ying Han <yinghan@google.com> wrote:
>> On Tue, Apr 26, 2011 at 5:47 PM, KOSAKI Motohiro
>> <kosaki.motohiro@jp.fujitsu.com> wrote:
>>>> > > \x1a{
>>>> > > \x1a \x1a \x1a struct xfs_mount *mp;
>>>> > > \x1a \x1a \x1a struct xfs_perag *pag;
>>>> > > \x1a \x1a \x1a xfs_agnumber_t \x1aag;
>>>> > > \x1a \x1a \x1a int \x1a \x1a \x1a \x1a \x1a \x1a reclaimable;
>>>> > > + \x1a \x1a int nr_to_scan = sc->nr_slab_to_reclaim;
>>>> > > + \x1a \x1a gfp_t gfp_mask = sc->gfp_mask;
>>>> >
>>>> > And, this very near meaning field .nr_scanned and .nr_slab_to_reclaim
>>>> > poped up new question.
>>>> > Why don't we pass more clever slab shrinker target? Why do we need pass
>>>> > similar two argument?
>>>> >
>>>>
>>>> I renamed the nr_slab_to_reclaim and nr_scanned in shrink struct.
>>>
>>> Oh no. that's not naming issue. example, Nick's previous similar patch pass
>>> zone-total-pages and how-much-scanned-pages. (ie shrink_slab don't calculate
>>> current magical target scanning objects anymore)
>>> \x1a \x1a \x1a \x1aie, \x1a"4 * \x1amax_pass \x1a* (scanned / nr- lru_pages-in-zones)"
>>>
>>> Instead, individual shrink_slab callback calculate this one.
>>> see git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin.git
>>>
>>> I'm curious why you change the design from another guy's previous very similar effort and
>>> We have to be convinced which is better.
>>
>> Thank you for the pointer. My patch is intended to consolidate all
>> existing parameters passed from reclaim code
>> to the shrinker.
>>
>> Talked w/ Nick and Andrew from last LSF, \x1awe agree that this patch
>> will be useful for other extensions later which allows us easily
>> adding extensions to the shrinkers without shrinker files. Nick and I
>> talked about the effort later to pass the nodemask down to the
>> shrinker. He is cc-ed in the thread. Another thing I would like to
>> repost is to add the reclaim priority down to the shrinker, which we
>> won't throw tons of page caches pages by reclaiming one inode slab
>> object.
>>
>> --Ying



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-05-20 12:31 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-25 17:22 [PATCH V2 0/2] pass the scan_control into shrinkers Ying Han
2011-04-25 17:22 ` [PATCH V2 1/2] change the shrink_slab by passing shrink_control Ying Han
2011-04-25 18:34   ` Rik van Riel
2011-04-25 18:46   ` Pavel Emelyanov
2011-04-26  0:42   ` KOSAKI Motohiro
2011-04-26  0:53     ` KOSAKI Motohiro
2011-04-27  0:03       ` Ying Han
2011-04-25 17:22 ` [PATCH V2 2/2] change shrinker API by passing shrink_control struct Ying Han
2011-04-25 18:34   ` Rik van Riel
2011-04-25 18:47   ` Pavel Emelyanov
2011-04-26  1:15   ` KOSAKI Motohiro
2011-04-27  0:21     ` Ying Han
2011-04-27  0:47       ` KOSAKI Motohiro
2011-04-27  1:15         ` Ying Han
2011-04-27  1:18           ` Ying Han
2011-05-20  2:59 KOSAKI Motohiro
2011-05-20  2:59 ` KOSAKI Motohiro
2011-05-20  3:23 ` Ying Han
2011-05-20 12:30   ` KOSAKI Motohiro
2011-05-20 12:30     ` KOSAKI Motohiro

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.