Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp868448rdb; Wed, 6 Dec 2023 02:08:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbquVisbJfBeD38HKBrqlrGdejy8dVTxVIiSzV+rTX18solzzvKk8P9AloedUR7JhSae3B X-Received: by 2002:a05:6a00:5b:b0:6ce:2731:5f84 with SMTP id i27-20020a056a00005b00b006ce27315f84mr346158pfk.67.1701857318872; Wed, 06 Dec 2023 02:08:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701857318; cv=none; d=google.com; s=arc-20160816; b=XBzNhVw5btUzqsC5rHFQJq8k4XK5LgFdMYu86tN7rWuH1eO0XpG7nKH59DUCzDu+fV 5TAo41M0LRrFMEoDhPfSW+vptc6T/i3GFFvHH4m45grCunz9659bDJjW0pW5JCW/Flwy W9RlJ8W5DUxAc6LRXOYIk/sOHG1P1CQfok50G4W6wOqNR5bGSIokQ9iHLy9y3JrMPaoJ AcTKQWmVkIHmoF2u/8F+5TWEAOZ/HZwAnMgVGsQyjrsMyq5Hpb92X0l4E9sEFeG4z89D ypwvyumYWlxazerFkyaTJlr0eHILAD+qcAHm8D/3f1dF5jzuwxFyVjTPRbtgLhdhxHvy l3Yw== 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 :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=nzPtJSstrz43lOMah6a0IQ0FeQVV1HLyQOAK6AjcRVg=; fh=RD4T+d0NUvkOK9nuRNUtGBJeG+kgCpkicCsErEpvzic=; b=0MUOB6XMRksJYJJuxBHbefs5PARmeLUUUNLCdfq7sjZw4TEJJKzlvaeS8ZVlrzyVqp Tr4FL47YzOTOOf7QOHIFToJXnHhcvXJ16mxx7TQq79azFWoJXyzjzYUNKE+9XWplHdtd lpHqXx2SOCvDYNH7pBrBNmAChD66CfDI2hd63ex39gv6HchX7azOoYba8Qa8rY50TV4g f/iKs/keKTS3NaBpVhn++ttnx00C8CU3QCoNh9kgoGGnfUpOKxatyV16aZCn+HIrOJUR GjKmLnatsmzAz/kamutNELVHhr9b5qA94yEodAVDJobj0HfwhT5HBCb15WfnMfKCyAAX IcDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q73-20020a632a4c000000b005c65ed0f680si7323391pgq.463.2023.12.06.02.08.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 02:08:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0928B802C7E6; Wed, 6 Dec 2023 02:08:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377395AbjLFKIZ (ORCPT + 99 others); Wed, 6 Dec 2023 05:08:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377380AbjLFKIY (ORCPT ); Wed, 6 Dec 2023 05:08:24 -0500 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CFDED62; Wed, 6 Dec 2023 02:08:26 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7AB216000A; Wed, 6 Dec 2023 10:08:21 +0000 (UTC) Message-ID: Date: Wed, 6 Dec 2023 11:08:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/2] riscv: Enable percpu page first chunk allocator Content-Language: en-US To: Alexandre Ghiti , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Arnd Bergmann , Dennis Zhou , 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 References: <20231110140721.114235-1-alexghiti@rivosinc.com> From: Alexandre Ghiti In-Reply-To: <20231110140721.114235-1-alexghiti@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 02:08:37 -0800 (PST) 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? Thanks, Alex