From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbbC0Ce5 (ORCPT ); Thu, 26 Mar 2015 22:34:57 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:36249 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752272AbbC0Ce4 (ORCPT ); Thu, 26 Mar 2015 22:34:56 -0400 Date: Fri, 27 Mar 2015 11:34:48 +0900 From: Minchan Kim To: Sergey Senozhatsky 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 Message-ID: <20150327023448.GC26725@blaptop> References: <5513199f.t25SPuX5ULuM6JS8%akpm@linux-foundation.org> <20150326002717.GA1669@swordfish> <20150326073916.GB26725@blaptop> <20150326081313.GB1669@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150326081313.GB1669@swordfish> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2015 at 05:13:13PM +0900, Sergey Senozhatsky wrote: > 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 depends on preemption model. If you enable full preemption, you are right but if you enable just voluntary preemption, cond_resched will help latency. Thanks. -- Kind regards, Minchan Kim