Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1191517rdb; Wed, 6 Dec 2023 11:01:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+SHEsJYr55WdyNwtqXxGlYYZbGMts6NDVMpLyRZbbjTNXTAHk40odQbZDkxWunOW57eWc X-Received: by 2002:a17:902:7795:b0:1d0:8876:7078 with SMTP id o21-20020a170902779500b001d088767078mr1039775pll.44.1701889265802; Wed, 06 Dec 2023 11:01:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701889265; cv=none; d=google.com; s=arc-20160816; b=evS/ke7p4FBruFmuHRiuaGYXM139M6v9eGLa0thx45E6bd9KZtZTkU3d1ubkHguL8m /GacRLJxIkttKcknJw0HxL+XMAOZQOljrjKJkxDGiltFp5k3Y7u7wAp69TbNSYjRwWER wjLJNgEDYP7tEYwxevZQNQiLMAf5k2qdL7jXjZmQ+xZx9zSpDpt2jlAiuMhNdgqBj9Hs jOGm0LJjOun3QjT0vl2YaW0iQDOJQby0enla1Jff2b3t4dRiOZOJLKWcLBJ4tkVr4yy8 rxedooATnM/JqmHY+Pc30+kFQxANyVuy36f818+WprSp0svbLhps9bb1EwDOVPR8zcE/ AZcg== 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:sender:dkim-signature; bh=gzbohbzVePtQAWojGFBvS0mVM42OxJTLPxt60AU1LYc=; fh=AXgH4/fcqcgqccD/cDS/xy+NOvgQKgKUMuPovHDZvQI=; b=DR4ZcZXsc8Y2jeSN6WV+sHC0hUmIYwEYRyaj41xJ0YCxL/KpV41THpQe2Tt8FtAadZ 7yhcfAT20vb5mkL5elXsNIYVuZDESvNREyrLAEvyvXv3BadrjyMeQkZE7z90eV7IZr3a W+MQBboTl+C+9KedJp3MPf2M8v/eLUiVPs/uVyzWnvfqbCP3jcjaK8bmRJ8enciE4bs1 pGFgwt8jAst9gA4XlecsL+jITgxlAGmD0fklZ4zSoFjCw8wmdXPl0LM6MpfOJAfvfCkv tuMJYwzZ4CMZ3uHGKkDKyKJQjLG/+wWfmWhukyJk3bKOww+Jb3NoGBQAS6sb8E7CRb2R 8yhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FS8F1Nji; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id s3-20020a170902b18300b001d0d15b9c7dsi203635plr.563.2023.12.06.11.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 11:01:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FS8F1Nji; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 2381780789CC; Wed, 6 Dec 2023 11:00:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378927AbjLFTAZ (ORCPT + 99 others); Wed, 6 Dec 2023 14:00:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378848AbjLFTAX (ORCPT ); Wed, 6 Dec 2023 14:00:23 -0500 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E565B193; Wed, 6 Dec 2023 11:00:29 -0800 (PST) Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-286e676ffa0so152592a91.1; Wed, 06 Dec 2023 11:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701889229; x=1702494029; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=gzbohbzVePtQAWojGFBvS0mVM42OxJTLPxt60AU1LYc=; b=FS8F1NjiwZT8FmM7L617gO7Pg9H/a9IsBa6ryAYBD4jiO1WTUnSvyUckmdGBum8KoU BQqzUl4X+XiSavCZD23wmdSBkZm40X2ifg5//zD7HOgc5oS3dgr11nD2i6aAHCSkQ+AI O4YYx9bJ6tQbEETsnEVL2KE31GE3XOPPj5Wh5f2BFiQDYLIWPUEjwxUBOzIEovyxUGP/ HbaNsnwVVpLZXgydQAzGyYLOaieeVRDG6Hb6KTLgCymnFYQH627ESJzTxzTaRptwUATm mwyCNoSQbKP9Txzuls6Cn83PCzzeyHAK287RZOOI+L0VIS/vwQ+OiQ9MH/A1SE20JJEF qfgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701889229; x=1702494029; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gzbohbzVePtQAWojGFBvS0mVM42OxJTLPxt60AU1LYc=; b=J3yDwY4OM8LEWo4JMseQp1VFQIAHnGPuKUczxobyEXiBqXq6vTzMktKGSuybmTzmOY tz1WrLnEhH4S+tPh7EyK/wHJBhDknBM49i06Y76uD8KvCnU84CAjM+dA505T6fH0MCDi THm/G42Zqr5ot8bakN2AqCVQTdLZglEGTZa00hfyjVRN1+qEjTAELdQepC5ivMbliH66 ++EX1u3raIz1Putgyr99oCVuTJZX8NYLykTMVmkPUpVYEBWsICmfz2/2K0hS5MqHDLq0 pxVzpLgKLP8lXl4jYjOKBD87US5pSCic14Y3iRpknjVIS+7lFAg9oKA5rudG3mBkwF19 WDUg== X-Gm-Message-State: AOJu0YxvZWL9mmz1co0FluPCZO4CgleudRJCBRunVeje4IRT1nxM7Sgw bkZGni4YHUO0/UtYY/vDTc4= X-Received: by 2002:a17:90b:38c5:b0:286:aded:d5de with SMTP id nn5-20020a17090b38c500b00286adedd5demr1064920pjb.15.1701889229200; Wed, 06 Dec 2023 11:00:29 -0800 (PST) Received: from localhost ([2620:10d:c090:400::4:27ef]) by smtp.gmail.com with ESMTPSA id w4-20020a1709027b8400b001d049cc4c9asm169921pll.7.2023.12.06.11.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 11:00:28 -0800 (PST) Sender: Tejun Heo Date: Wed, 6 Dec 2023 09:00:27 -1000 From: Tejun Heo To: Alexandre Ghiti Cc: Alexandre Ghiti , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Arnd Bergmann , Dennis Zhou , Christoph Lameter , Andrew Morton , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 0/2] riscv: Enable percpu page first chunk allocator Message-ID: References: <20231110140721.114235-1-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 06 Dec 2023 11:00:42 -0800 (PST) On Wed, Dec 06, 2023 at 11:08:20AM +0100, Alexandre Ghiti wrote: > Hi Tejun, > > On 10/11/2023 15:07, Alexandre Ghiti wrote: > > While working with pcpu variables, I noticed that riscv did not support > > first chunk allocation in the vmalloc area which may be needed as a fallback > > in case of a sparse NUMA configuration. > > > > patch 1 starts by introducing a new function flush_cache_vmap_early() which > > is needed since a new vmalloc mapping is established and directly accessed: > > on riscv, this would likely fail in case of a reordered access or if the > > uarch caches invalid entries in TLB. > > > > patch 2 simply enables the page percpu first chunk allocator in riscv. > > > > Alexandre Ghiti (2): > > mm: Introduce flush_cache_vmap_early() and its riscv implementation > > riscv: Enable pcpu page first chunk allocator > > > > arch/riscv/Kconfig | 2 ++ > > arch/riscv/include/asm/cacheflush.h | 3 ++- > > arch/riscv/include/asm/tlbflush.h | 2 ++ > > arch/riscv/mm/kasan_init.c | 8 ++++++++ > > arch/riscv/mm/tlbflush.c | 5 +++++ > > include/asm-generic/cacheflush.h | 6 ++++++ > > mm/percpu.c | 8 +------- > > 7 files changed, 26 insertions(+), 8 deletions(-) > > > > Any feedback regarding this? On cursory look, it looked fine to me but Dennis is maintaining the percpu tree now. Dennis? Thanks. -- tejun