From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F329C4167B for ; Wed, 6 Dec 2023 10:08:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D0E166B0092; Wed, 6 Dec 2023 05:08:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CBDDC6B0095; Wed, 6 Dec 2023 05:08:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B85736B0098; Wed, 6 Dec 2023 05:08:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id AA02E6B0092 for ; Wed, 6 Dec 2023 05:08:30 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 7977F160154 for ; Wed, 6 Dec 2023 10:08:30 +0000 (UTC) X-FDA: 81535968780.02.7B23A11 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by imf01.hostedemail.com (Postfix) with ESMTP id 73FAA40015 for ; Wed, 6 Dec 2023 10:08:27 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of alex@ghiti.fr designates 217.70.183.195 as permitted sender) smtp.mailfrom=alex@ghiti.fr; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701857307; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nzPtJSstrz43lOMah6a0IQ0FeQVV1HLyQOAK6AjcRVg=; b=kwkzzK2GN4bTXFrGBLizpUSyXZyfj7yskHUGRjz6xGWSfaZg+m4F4InFZ+9ue0R2bRDsJh Pji5M+SeVnx2btfDfSlks8/rpit8ACOnCY/BYxcr0d4chWOS9B2XAJpzOBCOBwZRWf/8OA tChrQFgnPUeWJBbJ5WZ9vZt0BrQpWvI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701857307; a=rsa-sha256; cv=none; b=DAaI8gyDGIEYr+z4MAyFgSdZbSbyWPDgFNuqkhdPaMdV+LRAj5PkM3+j2Mw/WmyqACzwig FIc/vIFcd/j26X7AFZN8GUJ5f0xDG5mJbkchTejXDiZ9ZXTBOm+wF3tA9LVuxE9hIBBTUW CkIgGSGKIivM2BriOVwrJidn3bfBF6M= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of alex@ghiti.fr designates 217.70.183.195 as permitted sender) smtp.mailfrom=alex@ghiti.fr; dmarc=none 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-Stat-Signature: 85e47iw4ajsfxa5ffwrxs7r64jq8nxhw X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 73FAA40015 X-Rspam-User: X-HE-Tag: 1701857307-392057 X-HE-Meta: U2FsdGVkX1/pljFSP3Z8bctkg+FuK4MUveZnJs5z7IwSDDlU/bkCT5oWyHa61qx9iGSwEM20YhTREU0pG9AzqlQd0xN4/o7/IePKj3qTma1XzKITqrWvrtch7LQ8V3t1EKn/XvwSqRhKZ7t7KCUMPrHanDw4ZfMf3SHpfswbgoZ7QTtTfMFcrdQEhA/dQlm/hpWn91gUYJTD6YDJ7SwBb05arX+CUPfByz6resY+nlVlHymKM8Cl6FZ5MXORQEbuGQn+Kn8ieHta6reXtng+2veNh74ToY4u3PJxuPL7HkF3ZIgA3ZAh42gIJbqwill1abc2hSgcJ5zwGhqnNLX0P6E5TPxElt9bckJ2lGN/Qi4x4EV7P2SRMopZQIHsh6rBsK/IRa8m4JVb7kzZRMDvPyIHCTmunQ7fTaSPdbdiSIEidaOYeDfxUaPyYMHZKg5kA0QwyrmV8NTWPjfOWlfVr++BRy73kISpSyezgoexjT5gv5Q7oRNoDgrJerT8zSqoeTXKmOz55RD2l0o1ltOlXy3txmox030C3voRYgFca2LE4/WwWrzRwRx6cPrG4s5Af85xt6Hr5VGHOisLLeIZzIQRoh3o+fpf4P3mk97RCQH5za5M4rRgKqA7BOFVizCMntigpEjGmqry7x/Mzh0G44UXbXwz1nk3TkimqcgX9+uTXgZsGU2U/64pqPYlZnlhWDDCtuhAZ5rHlPlzZpFKaBFoIa7eTBdxfaHEJjpTPMaSzr74GTjx8DC+zhgrB/rRFVDuER2tmyj2yOEY5t0Dt8EcMTmV91/zZ75wgMbNGSQ9VkbUa8CWXQf6vbqlqA8gO+/dwSMKFMn1nsoMhG1YuYf7+ELWFUpGyAxaKKbzvPPsF8J/fANjSlZdr6I6UoQljsEBPq873s5jwkGclYV3YX/geB27WIxTuiq/bzINfldU1Q/J5PhEw9DJEX785BQd8S29RJIXYexldUBdFQW SeWRWdi9 bfZziu+P5bB+eTOOPdvZ4St6x44mFdt3fpp5adv9TTdwnJHc86H1uYRx9E51H5dZ/VmyE3fbwxRKZGq0dkfqwQ0OXV9kD+RM3S5VfOMVwrG/PA/O7sPlANFUnxkpEL+7T8X+PcuYd2Ua6V7J2XtLDSrKB54HJbzps6JCZ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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