Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1242970pxb; Fri, 21 Jan 2022 13:11:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7dIO8A+GSZpS0P5kSzeVfvPk2Uuj+V/bf5FtCNngSmqBfLk0rePYT0eDIQBWax1VoeCCj X-Received: by 2002:a05:6a00:1592:b0:4c2:7f6e:c37d with SMTP id u18-20020a056a00159200b004c27f6ec37dmr5471286pfk.82.1642799464142; Fri, 21 Jan 2022 13:11:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642799464; cv=none; d=google.com; s=arc-20160816; b=AmbZ3nLFP/jkklf1FqIEMAl0QIkfoq7w/IAgLoGYHs8xVxFYHOREhSFF2AZeeyLYE0 XfD1CxOBQINqCsFNSsjVU8+2DfPR+uPvfsq4JgC0vBhTrtpuVtwXK5bPgZjcfVXpPq7H Xoz9GycmMm/EkvUNc8f8YJnPm7ejqEAbxfgXFH9HScqYfZjq9tJRGHEPsp2Fu9Wk/fKL F0YwPdFkuV5n1gB14iF5+cDqLk031JRfmCZ30tsOeEi1mVSJFLwXxuJZrdXlB8Dwb634 S15J2/px9KaJ7W2OwoYDBr+6TI6Ax+8qbB8c3KzparJUECmzG/yMsy70WsgRuM+k/WJM WQOA== 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=9xN1A4lWeBuAThpXk0pGMox/x+1CE4rQvfPoSz5lPBo=; b=Yljyv3f5DRHZ9To5aUIAf8Of0M8/yu94fQ4jOlUJvIS3u/Lo2nZ8ndxnPaRTqVCIRr I7M05VoqtjFNnSypBcuJhTVyZ0YSTPvahs25SLXl744O6R91CNe6GQBh3RdrzNBd/4YX 5e6XpipW2F5UJ4ZenCyn+xdQW8oJGuKN9viCUsBPP2dvBN1Ao47NENaB408t+kRqTv0e oeDT5146/+bOmypfddh/mKA8BQu11yrqllD65NGnOt+pStdWXrqZh0QK0pkeMKBz97lj GIwt0lLJqqed1H1m1l8PWUM+ztYxOhJDIf0oluQ8Q3r42nS/DK4kZV/QBiASCxqJfo0w 8MFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=DQ1G29y8; 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=QUARANTINE 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 d16si8871350pfv.175.2022.01.21.13.10.51; Fri, 21 Jan 2022 13:11:04 -0800 (PST) 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=DQ1G29y8; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359166AbiATIYZ (ORCPT + 99 others); Thu, 20 Jan 2022 03:24:25 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:35740 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239758AbiATIYY (ORCPT ); Thu, 20 Jan 2022 03:24:24 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id CDB492170E; Thu, 20 Jan 2022 08:24:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1642667062; h=from:from:reply-to: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=9xN1A4lWeBuAThpXk0pGMox/x+1CE4rQvfPoSz5lPBo=; b=DQ1G29y8OoQl93S/EwONlm0kwcF3RB14EvOwLeJ7E8JIqTbV5Klh9zVLgEsmR8WKn9ijEs eektIwbI9bT8KDaDyJ33zSaFxpdPwVLgaGwvjFqSXYwwFMnL4EXFeLvYiEY3C480wYzb5y f39pYmWW5cBr4IQVQN6TwGYHszDZzKc= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 6FA4CA3B85; Thu, 20 Jan 2022 08:24:19 +0000 (UTC) Date: Thu, 20 Jan 2022 09:24:22 +0100 From: Michal Hocko To: Minchan Kim Cc: Andrew Morton , David Hildenbrand , linux-mm , LKML , Suren Baghdasaryan , John Dias Subject: Re: [RESEND][PATCH v2] mm: don't call lru draining in the nested lru_cache_disable Message-ID: References: <20211230193627.495145-1-minchan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 19-01-22 20:25:54, Minchan Kim wrote: > On Wed, Jan 19, 2022 at 10:20:22AM +0100, Michal Hocko wrote: [...] > > What does prevent you from calling lru_cache_{disable,enable} this way > > with the existing implementation? AFAICS calls can be nested just fine. > > Or am I missing something? > > It just increases more IPI calls since we drain the lru cache > both upper layer and lower layer. That's I'd like to avoid > in this patch. Just disable lru cache one time for entire > allocation path. I do not follow. Once you call lru_cache_disable at the higher level then no new pages are going to be added to the pcp caches. At the same time existing caches are flushed so the inner lru_cache_disable will not trigger any new IPIs. -- Michal Hocko SUSE Labs