Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp797857rwe; Thu, 1 Sep 2022 07:48:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5yo8eipnnSVqALde1M+7ZBlcPxi04GMSvWXOl/yyBqhzPqDcY/ZSbSKO8BMcWQYCX0msHd X-Received: by 2002:a63:88c3:0:b0:42b:33f8:6bc2 with SMTP id l186-20020a6388c3000000b0042b33f86bc2mr26135710pgd.495.1662043685684; Thu, 01 Sep 2022 07:48:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662043685; cv=none; d=google.com; s=arc-20160816; b=y5y5lq7foRaZPfxQgha/72eYLIMxpOVBOFBjQjJJmGrDT4aekwQk+esf4WgZgkc+pa zje+K3ew2jfcgEN9q6S7SN8AZqsg5kvZonU9bZGR5tlWoKE6GBrxl6/qRBObM0uyBOGx sfilSSlQSFUtPaBjQyAYs6+ubw1LCaUgTHIcjI+td764OK3P1qbQCt5HNLePilcMLV5u Y0uzc4VLdXxqiq5Y8StyPQNf013SAbjZSj0qoT+MHRnlegJZsIIzTr1kHpMskqSaeTCq JRz5vhGRelbG0JG9LusDzgAFB7jKxw48DLaxFK7Jff2FTvgFX3kT2D1Kq8WgKENfHj4e Vyrw== 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:dkim-signature:date; bh=hzpqzF+cHXDydzBO/Ouha4xSMTzYETXF6uFA22HjvEI=; b=FL7Zrat+40qcN4jOn0BpMwdRR3OxFVRNTvHCr/fjR3xmK+v+2pS6L3+4l/fmHfSVMt nZ91RwNUkTcOpkh9OrESjW5i+mpRFbaJq1SAE2YLVehFsG76bfqi4Mb9JQbcgi0loaA9 o9zh9/3tshXjKw8xuS5BHdrLPkiDZSARa9wLHzsFqe97Dg6Gqc7T5NtPSdT/3848pIVK K3dfLTwwGlqpmBsa6rwf22o3sekiOuWyTsc9NsJSBqBFAu2gnJAvheRIJYoH2YI4fbhD etpxWeYqAalKbG0kEQQyRriuykylhHaC5mbsu5zJytDG3vA1iaWj5OcUVr+bOP+nHx9K GBzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=NZoXkZHK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b7-20020a170902d50700b0017508e502a1si10335969plg.289.2022.09.01.07.47.53; Thu, 01 Sep 2022 07:48:05 -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=@linux.dev header.s=key1 header.b=NZoXkZHK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234816AbiIAOcd (ORCPT + 99 others); Thu, 1 Sep 2022 10:32:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234729AbiIAOca (ORCPT ); Thu, 1 Sep 2022 10:32:30 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1087B73923; Thu, 1 Sep 2022 07:32:28 -0700 (PDT) Date: Thu, 1 Sep 2022 10:32:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662042747; 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=hzpqzF+cHXDydzBO/Ouha4xSMTzYETXF6uFA22HjvEI=; b=NZoXkZHKLzeUxAk3ak7Pb8vsW9ZNZzRTwKtA+BC4xdSYkJ+ynByJWkg/Sh230HugdVWRmg yoek0j7jmp5SFliaDUrwdj/qDw5fARM6MIEEXIMmkE2NnaJO1XhB2/CCfm1A1hYZKgVq4b dPipMi7tKAPAIcwcMtS9bvz5Flf6OaU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Peter Zijlstra Cc: Suren Baghdasaryan , akpm@linux-foundation.org, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, void@manifault.com, juri.lelli@redhat.com, ldufour@linux.ibm.com, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, changbin.du@intel.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, arnd@arndb.de, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-mm@kvack.org, iommu@lists.linux.dev, kasan-dev@googlegroups.com, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 03/30] Lazy percpu counters Message-ID: <20220901143219.n7jg7cbp47agqnwn@moria.home.lan> References: <20220830214919.53220-1-surenb@google.com> <20220830214919.53220-4-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Thu, Sep 01, 2022 at 08:51:31AM +0200, Peter Zijlstra wrote: > On Tue, Aug 30, 2022 at 02:48:52PM -0700, Suren Baghdasaryan wrote: > > +static void lazy_percpu_counter_switch_to_pcpu(struct raw_lazy_percpu_counter *c) > > +{ > > + u64 __percpu *pcpu_v = alloc_percpu_gfp(u64, GFP_ATOMIC|__GFP_NOWARN); > > Realize that this is incorrect when used under a raw_spinlock_t. Can you elaborate?