All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	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 17:13:13 +0900	[thread overview]
Message-ID: <20150326081313.GB1669@swordfish> (raw)
In-Reply-To: <20150326073916.GB26725@blaptop>

On (03/26/15 16:39), Minchan Kim wrote:
> Hello Sergey,
> 
> Sorry for slow response.
> I am overwhelmed with too much to do. :(
> 

Hello,
sure, no problem.

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

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


in outer loop we have preemption enabled and unlocked class. wouldn't that help?
(hm, UP system?)

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

thanks!

	-ss

WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	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 17:13:13 +0900	[thread overview]
Message-ID: <20150326081313.GB1669@swordfish> (raw)
In-Reply-To: <20150326073916.GB26725@blaptop>

On (03/26/15 16:39), Minchan Kim wrote:
> Hello Sergey,
> 
> Sorry for slow response.
> I am overwhelmed with too much to do. :(
> 

Hello,
sure, no problem.

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

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


in outer loop we have preemption enabled and unlocked class. wouldn't that help?
(hm, UP system?)

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

thanks!

	-ss

--
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  8:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 20:25 [withdrawn] zsmalloc-remove-extra-cond_resched-in-__zs_compact.patch removed from -mm tree akpm
2015-03-26  0:27 ` Sergey Senozhatsky
2015-03-26  0:27   ` Sergey Senozhatsky
2015-03-26  7:39   ` Minchan Kim
2015-03-26  7:39     ` Minchan Kim
2015-03-26  8:13     ` Sergey Senozhatsky [this message]
2015-03-26  8:13       ` Sergey Senozhatsky
2015-03-27  2:34       ` Minchan Kim
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=20150326081313.GB1669@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --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 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.