Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp932020rwr; Wed, 26 Apr 2023 08:06:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ybgMjGcAnqJxteN26SP14xl51Sg4o6xdZEp560DOIAWn/D/H5FQV/Ne1r5QgyHWqCQ72n X-Received: by 2002:a17:902:8d8a:b0:1a9:826c:8f2f with SMTP id v10-20020a1709028d8a00b001a9826c8f2fmr8139312plo.16.1682521596669; Wed, 26 Apr 2023 08:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682521596; cv=none; d=google.com; s=arc-20160816; b=kloaTWDstQ0W28Lr2FFkcvHynqUAUifeml5kzhogachlbmpUblbmAXaDvyBrHtvsFm 5ufRecdr+0YWbx+tI9wSzAIuoi9akt0ezWCN9i/Lo2kTxZufnz5JxT5onUVi3+WRJaSd iM4sU53b+EPx7wvQbAQeK4f8iaMbOctBMidfQ38NMg6Gxv4hHBoY8n456KXtfdQC6x3z mOdZ11gHxzw6sGRjJFiS/7QG1CeFwH0FjUaMkuWjuvGD0VPUBRW1bHCq3R5bh4HoEkcP zhajij+puXdaWvqQNItmGDnMoNVxURaQToS+DPb4ru5eV7mYqMl6Jx9vZx/fA3TvFaAc iRtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=ran8tF+5YdxHQWbx/a5kNj8I7fUsKN7ujlcec/eb9Uc=; b=iDydOqbCa4QOzO5gdVVemf58wXVcnJFIAS0Po6ak924GWqnE37CHVdJ8ASvAMcAkSw Ju6+2CTLN577oBgkp4+0DSe/lR1yULw3ytuIhVRUHWRa5L31aTzUspyLsLW3yY5AzVcj qU6XYvadGTYPZ8ORWs9Nahu6gd4cwvO5BUA4GfaVmrZme1V5qPZ84S/M0i0r1Xt6C4rE WZK4uQ4OhFxQlBWvfGNh/X6as0dTQN0Gl3f1F+soRis4UiV/DuD4OtukZj9cVS0X5USE TTl2+XnlvRvrazgg8uxJRUgrBBpSVDQ4fhxKvwHPDsjoBoyi0rGVL5m5c1vcugrPG0vJ LNtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=gfD6s8wJ; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p5-20020a170902780500b0019ad97d72cfsi15884180pll.590.2023.04.26.08.06.22; Wed, 26 Apr 2023 08:06:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=gfD6s8wJ; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241233AbjDZPFG (ORCPT + 99 others); Wed, 26 Apr 2023 11:05:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241172AbjDZPFA (ORCPT ); Wed, 26 Apr 2023 11:05:00 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A35477696 for ; Wed, 26 Apr 2023 08:04:51 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 621041FDD2; Wed, 26 Apr 2023 15:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1682521490; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ran8tF+5YdxHQWbx/a5kNj8I7fUsKN7ujlcec/eb9Uc=; b=gfD6s8wJu7G73s2FAfefxkP92wl2/oRlyHOxoMDqBACvRHxPVXHKVvv2eBnYh+rY+4OmvX jAmcRLpVXC40ohDY9gXZdN+5XqeXsaOJngbF4CHeA9cYs6yC/o0/7srhzbEP2xV4q7cttb Q4CVDkVvYI2z58pqwc8MPoonyxQnFkI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1682521490; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ran8tF+5YdxHQWbx/a5kNj8I7fUsKN7ujlcec/eb9Uc=; b=JZP2tJxjFXOmgTvjg3n8TpZHbTiIIECcpSIqGXfMnK1Wtrv+okh+V8bX93K0g488LXKYLg MyU9jbtj3czKC3Bg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3268513421; Wed, 26 Apr 2023 15:04:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5a1qC5I9SWRSdgAAMHmgww (envelope-from ); Wed, 26 Apr 2023 15:04:50 +0000 Message-ID: <44f2df1a-ace4-0c44-166f-4f2fef49e0c1@suse.cz> Date: Wed, 26 Apr 2023 17:04:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v7 00/13] fold per-CPU vmstats remotely To: Marcelo Tosatti , Michal Hocko Cc: Frederic Weisbecker , Andrew Morton , Christoph Lameter , Aaron Tomlin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Russell King , Huacai Chen , Heiko Carstens , x86@kernel.org References: <20230320180332.102837832@redhat.com> <20230418150200.027528c155853fea8e4f58b2@linux-foundation.org> Content-Language: en-US From: Vlastimil Babka In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/20/23 15:45, Marcelo Tosatti wrote: > Perhaps the complexity should be judged for individual cases > of interruptions, and if a given interruption-free conversion > is seen as too complex, then a "disable feature which makes use of per-CPU > caches" style solution can be made (and then userspace has to > explicitly request for that per-CPU feature to be disabled). > > But i don't see that this patchset introduces unmanageable complexity, > neither: > > 01b44456a7aa7c3b24fa9db7d1714b208b8ef3d8 mm/page_alloc: replace local_lock with normal spinlock > 4b23a68f953628eb4e4b7fe1294ebf93d4b8ceee mm/page_alloc: protect PCP lists with a spinlock Well that one is a bit different, as there was one kind of lock replaced with other kind of lock, the lock is uncontended unless there's remote flushes happening so it's not causing extra overhead for the fast paths, and later even the irq disabling was removed, which should even improve things. But this patchset is turning all vmstat counter increments a cmpxchg.