From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 679F5C433E7 for ; Fri, 16 Oct 2020 13:45:01 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AF4EF20866 for ; Fri, 16 Oct 2020 13:45:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="scgYfHVy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF4EF20866 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E7FD06B005C; Fri, 16 Oct 2020 09:44:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E54AB6B0062; Fri, 16 Oct 2020 09:44:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D915B6B0068; Fri, 16 Oct 2020 09:44:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id BFE7D6B005C for ; Fri, 16 Oct 2020 09:44:59 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 72457824999B for ; Fri, 16 Oct 2020 13:44:59 +0000 (UTC) X-FDA: 77377909518.30.suit47_0b0679b2721d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 400DB180B3C83 for ; Fri, 16 Oct 2020 13:44:59 +0000 (UTC) X-HE-Tag: suit47_0b0679b2721d X-Filterd-Recvd-Size: 2206 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Fri, 16 Oct 2020 13:44:58 +0000 (UTC) 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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