linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: akpm@linux-foundation.org, sergey.senozhatsky@gmail.com,
	ngupta@vflare.org, sfr@canb.auug.org.au,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [withdrawn] zsmalloc-remove-extra-cond_resched-in-__zs_compact.patch removed from -mm tree
Date: Thu, 26 Mar 2015 16:39:17 +0900	[thread overview]
Message-ID: <20150326073916.GB26725@blaptop> (raw)
In-Reply-To: <20150326002717.GA1669@swordfish>

Hello Sergey,

Sorry for slow response.
I am overwhelmed with too much to do. :(

On Thu, Mar 26, 2015 at 09:27:17AM +0900, Sergey Senozhatsky wrote:
> On (03/25/15 13:25), akpm@linux-foundation.org wrote:
> > The patch titled
> >      Subject: zsmalloc: remove extra cond_resched() in __zs_compact
> > has been removed from the -mm tree.  Its filename was
> >      zsmalloc-remove-extra-cond_resched-in-__zs_compact.patch
> > 
> > This patch was dropped because it was withdrawn
> > 
> > ------------------------------------------------------
> > From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> > Subject: zsmalloc: remove extra cond_resched() in __zs_compact
> > 
> > Do not perform cond_resched() before the busy compaction loop in
> > __zs_compact(), because this loop does it when needed.
> > 
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> > Cc: Minchan Kim <minchan@kernel.org>
> > Cc: Nitin Gupta <ngupta@vflare.org>
> > Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > 
> >  mm/zsmalloc.c |    2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff -puN mm/zsmalloc.c~zsmalloc-remove-extra-cond_resched-in-__zs_compact mm/zsmalloc.c
> > --- a/mm/zsmalloc.c~zsmalloc-remove-extra-cond_resched-in-__zs_compact
> > +++ a/mm/zsmalloc.c
> > @@ -1717,8 +1717,6 @@ static unsigned long __zs_compact(struct
> >  	struct page *dst_page = NULL;
> >  	unsigned long nr_total_migrated = 0;
> >  
> > -	cond_resched();
> > -
> >  	spin_lock(&class->lock);
> >  	while ((src_page = isolate_source_page(class))) {
> >  
> 
> Hello,
> 
> Minchan, did I miss your NACK on this patch? or could you please ACK it?

I saw this patch yesterday night but didn't acked intentionally because
I was not sure and too tired to see the code so I postpone.

If we removed cond_resched out of outer loop(ie, your patch), we lose
the chance to reschedule if alloc_target_page fails(ie, there is no
zspage in ZS_ALMOST_FULL and ZS_ALMOST_EMPTY).
It might be not rare event if we does compation successfully for a
size_class. However, with next coming higher size_class for __zs_compact,
we will encounter cond_resched during compaction.
So, I am happy to ack. :)

Acked-by: Minchan Kim <minchan@kernel.org>

> 
> 	-ss

-- 
Kind regards,
Minchan Kim

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

  reply	other threads:[~2015-03-26  7:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5513199f.t25SPuX5ULuM6JS8%akpm@linux-foundation.org>
2015-03-26  0:27 ` Sergey Senozhatsky
2015-03-26  7:39   ` Minchan Kim [this message]
2015-03-26  8:13     ` Sergey Senozhatsky
2015-03-27  2:34       ` Minchan Kim

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=20150326073916.GB26725@blaptop \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sfr@canb.auug.org.au \
    /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