lkml.org 
[lkml]   [2014]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/zbud: init user ops only when it is needed
On Wed, 15 Oct 2014 19:00:43 +0900 Heesub Shin <heesub.shin@samsung.com> wrote:

> When zbud is initialized through the zpool wrapper, pool->ops which
> points to user-defined operations is always set regardless of whether it
> is specified from the upper layer. This causes zbud_reclaim_page() to
> iterate its loop for evicting pool pages out without any gain.
>
> This patch sets the user-defined ops only when it is needed, so that
> zbud_reclaim_page() can bail out the reclamation loop earlier if there
> is no user-defined operations specified.

Which callsite is calling zbud_zpool_create(..., NULL)?

> ...
> --- a/mm/zbud.c
> +++ b/mm/zbud.c
> @@ -132,7 +132,7 @@ static struct zbud_ops zbud_zpool_ops = {
>
> static void *zbud_zpool_create(gfp_t gfp, struct zpool_ops *zpool_ops)
> {
> - return zbud_create_pool(gfp, &zbud_zpool_ops);
> + return zbud_create_pool(gfp, zpool_ops ? &zbud_zpool_ops : NULL);
> }
>
> static void zbud_zpool_destroy(void *pool)



\
 
 \ /
  Last update: 2014-10-15 23:01    [W:0.195 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site