Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp365980rwe; Thu, 1 Sep 2022 00:15:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4e939i2Vq8H6khGahtPhYiH3OdBEUeSy9sWDu8Wl0PdNF9DvnXaT/Ni1X0sfZgauhTqiep X-Received: by 2002:a17:907:75c9:b0:73d:c6b2:538c with SMTP id jl9-20020a17090775c900b0073dc6b2538cmr22508963ejc.432.1662016522503; Thu, 01 Sep 2022 00:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662016522; cv=none; d=google.com; s=arc-20160816; b=dkCyvZ1byhHxg8j4xTcuPA5Ko82V2S9yUs4z+NEu4Gbc8S2O6XGndK2i6C4RjftcXf rb2XBlrbH0m/1YtNeYxOFiMIqif0dHZEVChWP8Ybq/scazvRVVEMyluO3GwsiLa4urQl nnVB3Oq3rmoO0V27RAmF5b47pmuqNwH/T78CkCDDGs5+VukIihV6eVjq9W5eq7zFYj1b weh2eXSDygczkxGK0ynORU5bGn8qSnPa+QRKDaKg5VGt0ieqI9bu9Dygs/QtYgTNBgkh 1FBKunR2vvYJ0KrD7OEZ7x2sYCJZa9zJRiSsVm1Kz5YvkWkOFzlvyh7NLJx9BAiKvlgE bAJA== 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=qvwvxWbXfnEQ3IUNjSPCWfkqNnnfffGD2A+a/tILXCw=; b=KHGB2dp8LroJz8xSUwVjf/GT7xOOw67oiYy5DSRFUXCRJLIFWO/Sq55w7S7EFA233o kBJb+G/iKNAG9/S626dvVQcZazjl9NAlE2AfiYtaEeOBuEuY1ki3DK+xqeE9R0eAglpP Bo12mXGC2DZ5tjr4VLTlQMRJaxlK/xuvp07wSmr7YKmbHf52xO3HC62bIZx0+16slb/E C654/hq5QU+Z/ZICYlIe7rAyZYtKm4P2J0su7e9E/Kd9XWAGMEDFI/ZpQdSXywNM7TfV uze91c+SkT4MOBI0vQY1DQFZcaymRIMGc4Bz5XGGrzo8SpFLx7t4jeHjYSaZTZcWTHJU Ayvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eDO+GXur; 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 m11-20020a056402430b00b00446bd8e291fsi1264121edc.526.2022.09.01.00.14.56; Thu, 01 Sep 2022 00:15:22 -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=@infradead.org header.s=casper.20170209 header.b=eDO+GXur; 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 S233272AbiIAGvm (ORCPT + 99 others); Thu, 1 Sep 2022 02:51:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232685AbiIAGvk (ORCPT ); Thu, 1 Sep 2022 02:51:40 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E023162167; Wed, 31 Aug 2022 23:51:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qvwvxWbXfnEQ3IUNjSPCWfkqNnnfffGD2A+a/tILXCw=; b=eDO+GXurFPPTEhSILm/ZJtBNxQ B/9JFPYXpVAQVWUcHDCKnIJB1CdMNaXyZHSoxVVCmiz4jck+Zph/Hso4OWj1yo59UkEI+TuSjs/0x 4BG2flE2PwSfLX89dYyD5r9GR/8VhGNI0N1wP4bgU/qL1SOlI1eG/E3m2lqxC2LJi2W5e2ZJJ7zFM 9WEyIPPuONeD1Tk8Yc6NZe7o+Iy919N/s3xHO7Z59aKE7A91A4yWodHn2+/k4lX6bmEaKbqBQMFS3 J++P7dbtRWHNfytn2lcsT7UoR+667IJI0PRpmXC+glH+3s6vtPuXP6y5P4CsaHrdycBcwdGm7XaxS LoVTq62g==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTe34-005oCR-9S; Thu, 01 Sep 2022 06:51:34 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E7F7D30010B; Thu, 1 Sep 2022 08:51:31 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id CFCAB20981381; Thu, 1 Sep 2022 08:51:31 +0200 (CEST) Date: Thu, 1 Sep 2022 08:51:31 +0200 From: Peter Zijlstra To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, kent.overstreet@linux.dev, 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: 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: <20220830214919.53220-4-surenb@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 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.