Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1213841pxu; Fri, 16 Oct 2020 06:48:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6on+ysG4n6CF88dBMNtT5VTAY7J7zWULJvxOOfM0aio3bCCTp1nSKKEvN9wed5EMhr+29 X-Received: by 2002:aa7:d352:: with SMTP id m18mr3950837edr.287.1602856139048; Fri, 16 Oct 2020 06:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602856139; cv=none; d=google.com; s=arc-20160816; b=H7A0V3SVfYTUwPzThtbwC2TNdktLsml+D0ZuNQ/YmBvxTK9t/IW3VLPDgxVuO7DSK/ 0bZJwvkP1uV1wsfvrMuGO+XmcfHkqkYKoX0Qw2LjCikmfKEYXlUzyt+SVqn0igSWMVlV mMmNBG8H0pCqi5jhDIuO6oYj98+K7l2TzxNdn6fWnXgEJk01RXYgUyS4FYa4unCu0Dfc t95YMZH2OHrmLDjVwjokM6dCTCSAQqzpddJLlt5pG4/2gGKHSxtYTJp6DH6h0tif+tJg 1IM4IbIWwmc45ngl935L3c5SlA11lELgG3rLhqwrfsSr6jOFxUVRRP96QRlroWyMGot7 imUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=oJzTVfxC1T+cdhkKfW+N+P+KAqQPZlXHhvLRm/Sh2UM=; b=k7dygB0HfeUFVoM9BFZCo3AZfTaf8ry2mejSnFPOLpCzHCzLW0sZ+pozMUKP2jdqle n++9L0UuyMboPoWD8G3kZFhi08Nqc/MRe2bS4AwwglnW8bTuOfXMBq3rppGtnd3TUjW3 4WQYlL8WPtoIZ8aCOTiH1LAi7jHdiGjieG9d6Ri5J6Jx4s5PD+nEXH2cfulFoHzWE6M/ xEpUluL/Uzzz3pV3ONJ45yZRU0/HOUY9CcHSBMd5rdKsPpa7gJiuZvh10gr0ptahpWaw C3I2IWn+E/amxPTFLVIWSyN4U6/90yz9j9uQ4I7sQz88u3d35UlH1opQ0kZ4sMThquuC rtnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=scgYfHVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si1656640ejb.619.2020.10.16.06.48.35; Fri, 16 Oct 2020 06:48:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=scgYfHVy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408335AbgJPNo7 (ORCPT + 99 others); Fri, 16 Oct 2020 09:44:59 -0400 Received: from mx2.suse.de ([195.135.220.15]:37418 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408215AbgJPNo6 (ORCPT ); Fri, 16 Oct 2020 09:44:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1602855897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oJzTVfxC1T+cdhkKfW+N+P+KAqQPZlXHhvLRm/Sh2UM=; b=scgYfHVyt8AM1Sy5FfasCZEUnUJnECD6w/I3XOY2ZvFbjfNtH+S7wf+Kz8j/VFdPN5ut+0 gTVfziLVOyud9RZIHpaYfYxUmSWgeJkBSPSfxJenfX+hKh6LDRUu7O7b1afLOEBPhWtEWs xQFkFvsPhJ+907P0V/kucUabBO+L0zI= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C7C89B2D2; Fri, 16 Oct 2020 13:44:57 +0000 (UTC) Date: Fri, 16 Oct 2020 15:44:57 +0200 From: Michal Hocko To: Tianxianting Cc: "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mm: vmscan: avoid a unnecessary reschedule in shrink_slab() Message-ID: <20201016134457.GM22589@dhcp22.suse.cz> References: <20201016033952.1924-1-tian.xianting@h3c.com> <20201016120749.GG22589@dhcp22.suse.cz> <9a2b772b13f84bdd9517b17d8d72aa89@h3c.com> <20201016130208.GI22589@dhcp22.suse.cz> <8a25eacf4b37460897911ade338754d3@h3c.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8a25eacf4b37460897911ade338754d3@h3c.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 16-10-20 13:20:41, Tianxianting wrote: > Thanks > I understood what you said :) > But whether it is proper to check reschedule in every loop when lock is taken? I do not see any actual problem TBH. cond_resched is mostly to increase interactivity for non preemptible kernel. It can reduce throughput but this is a memory reclaim path and I do not expect this to contribute to any moderate hot paths. Direct reclaim doesn't really count as a hot path. -- Michal Hocko SUSE Labs