Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5842909rdb; Thu, 14 Dec 2023 00:41:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGj7lZsVVHmCneQgzVwLcGNLUatDisUAkOM3HoMurCl69T87eQ3/sdLXnYWh/YOr80RH4NQ X-Received: by 2002:a05:6359:6b84:b0:170:406b:7ba9 with SMTP id ta4-20020a0563596b8400b00170406b7ba9mr8178502rwb.18.1702543274892; Thu, 14 Dec 2023 00:41:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702543274; cv=none; d=google.com; s=arc-20160816; b=iAymUt76pJ1fePQFaXFelVaVXH0Pk09K1sO3dIcYIuXJxOvZcRiY21xhhMeKHhCu+Q P6hrZO2pnN1mG+Pi2omtawwpwjYHxlYs2u5u6q62TvyT+B53X6fJZtgUVV/bFrCuyJGI xbw4xWgcH3pZ3lvvCsEbrcWl2Qf0l7D2pzRfRJsvJoxvMWRAxj0MNq3oA0qQS4URmALd ZXIdzEhHlBb328sFy4zxAGK5sFPiagvijJxcufwjgNXdM9+/+scQ/MPF1v0eaiMJZ7gv VGyHzKKTYtFLoDd0prLkxqESuFoh8xDGc6fC8F2uwOlVAcnfQbEUjtJwQ+lc02erPXq2 Zl9A== 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; bh=aQbR2JO/KFK5RF93JUmmx4V523VsDvrN1w2XiDVyh7c=; fh=f1eG24fLE50oJLlpN6q45mWEES4s7GsWvScw+XEiX5Y=; b=V3YwDC0qK06YCSu4dGjRndRmyvOMwZi39Xmpw2Xt1BMmLAspEag/gVbT71agFUCGXu JvchxKGasHRmCZ9xlT30gr0RMqLa8W/M97A0aUpPxpsg8SFAVEg0QLs0LnYx1Wovo7kz 0M41rB6vesamEhX+5oZ265x1A5jZjowBMWCJLZ37Q9/9xhUTaXOAZv8YIGSiMpUMHrf8 Cx+uUeN4mGsIUeINfwdfEROFmNAzfv7U/4OnRVz6o2Ls5sCp2YUAzAnZ0p1WbVX2ecLq 1W0tAZSN286sTHVHAINIyEoJyO5b8prGDjejPDG6HZSlcdxXiK8R2Sb/mrC9YPOrvxNq hffw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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. [23.128.96.32]) by mx.google.com with ESMTPS id hk12-20020a17090b224c00b0028aecc4bce1si1986163pjb.111.2023.12.14.00.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 00:41:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 6BA2C8082DD8; Thu, 14 Dec 2023 00:41:12 -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 S229731AbjLNIk5 (ORCPT + 99 others); Thu, 14 Dec 2023 03:40:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjLNIkz (ORCPT ); Thu, 14 Dec 2023 03:40:55 -0500 Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A76DE3; Thu, 14 Dec 2023 00:41:02 -0800 (PST) Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-35f833adaa6so346865ab.3; Thu, 14 Dec 2023 00:41:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702543261; x=1703148061; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=aQbR2JO/KFK5RF93JUmmx4V523VsDvrN1w2XiDVyh7c=; b=sC6+OGtMVPBf3BeuD1kktIfv9O3ogQa/33PK13qGxHjte53nFKFKF65vX7UdqExZHQ O/wlnENRDg4sofnJ1+B1ZTcFeIbwsnTcKmCbLzuQzcHerpc/J/Ws3uKg0MhPllgUBza7 or9abWiXWgmSa3e7nEvAJgX94Agc5OsFRC2u2An0sEc1zf5RGI2sl3axiBM0UVEmVMTr iNIy6qJJaudPInvNtLyzGCH81tAkr4lueKPTFGidS0HfU9JDS9Lvg2uD+YXK6Bd1KvfY v7D1o7v2RBHmUc26OhUGZQToa0e1Uwiwqy5Ebp+FXa7gEtW+WMysOcWgFMUrjeERomTq AN0Q== X-Gm-Message-State: AOJu0YziyXunf8HNNebY+uV4VVNMDIrDq+3v9mnv1eqVs/9iirU2CrQe kKBDpNo9FMLd0PibiBPu1/M= X-Received: by 2002:a05:6e02:1c4d:b0:35f:7629:87d3 with SMTP id d13-20020a056e021c4d00b0035f762987d3mr2870814ilg.43.1702543261164; Thu, 14 Dec 2023 00:41:01 -0800 (PST) Received: from snowbird ([136.25.84.107]) by smtp.gmail.com with ESMTPSA id o2-20020a1709026b0200b001cfad034756sm11747930plk.138.2023.12.14.00.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 00:41:00 -0800 (PST) Date: Thu, 14 Dec 2023 00:40:58 -0800 From: Dennis Zhou To: Alexandre Ghiti Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Arnd Bergmann , Tejun Heo , 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 v2 0/2] riscv: Enable percpu page first chunk allocator Message-ID: References: <20231212213457.132605-1-alexghiti@rivosinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231212213457.132605-1-alexghiti@rivosinc.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=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]); Thu, 14 Dec 2023 00:41:12 -0800 (PST) Hello, On Tue, Dec 12, 2023 at 10:34:55PM +0100, 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. > Note that most architectures do not include asm-generic/cacheflush.h so to > avoid build failures, this patch implements the new function on each of > those architectures. For all architectures except riscv, this new function > is implemented as a no-op to keep the existing behaviour but it likely > needs another implementation. > > patch 2 simply enables the page percpu first chunk allocator in riscv. > > Changes in v2: > - Rebase on top of 6.7 > - Define flush_cache_vmap_early() for all architectures that do > not include to avoid build failures > > Alexandre Ghiti (2): > mm: Introduce flush_cache_vmap_early() > riscv: Enable pcpu page first chunk allocator > > arch/arc/include/asm/cacheflush.h | 1 + > arch/arm/include/asm/cacheflush.h | 2 ++ > arch/csky/abiv1/inc/abi/cacheflush.h | 1 + > arch/csky/abiv2/inc/abi/cacheflush.h | 1 + > arch/m68k/include/asm/cacheflush_mm.h | 1 + > arch/mips/include/asm/cacheflush.h | 2 ++ > arch/nios2/include/asm/cacheflush.h | 1 + > arch/parisc/include/asm/cacheflush.h | 1 + > arch/riscv/Kconfig | 2 ++ > arch/riscv/include/asm/cacheflush.h | 3 ++- > arch/riscv/include/asm/tlbflush.h | 1 + > arch/riscv/mm/kasan_init.c | 8 ++++++++ > arch/riscv/mm/tlbflush.c | 5 +++++ > arch/sh/include/asm/cacheflush.h | 1 + > arch/sparc/include/asm/cacheflush_32.h | 1 + > arch/sparc/include/asm/cacheflush_64.h | 1 + > arch/xtensa/include/asm/cacheflush.h | 6 ++++-- > include/asm-generic/cacheflush.h | 6 ++++++ > mm/percpu.c | 8 +------- > 19 files changed, 42 insertions(+), 10 deletions(-) > > -- > 2.39.2 > Thanks for the quick v2. Applied to percpu#for-6.8. Thanks, Dennis