From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82D2939EF01 for ; Thu, 2 Jul 2026 09:04:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782983068; cv=none; b=ZNeejvzd0d2iPjbRcx5WHOqQqsuNpLKzikQkhOCDhaKn95jIM/VqDNGHdBeDFVEZjzQy6qKTSLCyzh2xvdUEEAXTSGltb31Wipsj8K2OqsGzq2goor1OWL4BaniolCZh9L+2mUD8N/FFBBrgMg6ZxBTEOxts1EdSu7hdCT0SgJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782983068; c=relaxed/simple; bh=bxj7idFIddLvJ5HWVPJxebSB4dWAOhYrwboRW4GesHY=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Uo3VuDxaxiOKRfTOsnossj7mqZDTqyRWjprcZiYpm9wbbXQ5wBQobJ6jV0gLPOoV4Sqjo3OBuW71988DGpib3oq1YasXENVUV2pjoVObPDiTrvn0CGfVO58O2p2rt3dvI0PnEHAcF6P8jtPzX84BJJ/VeR4dxVDkT7DJlMO/X3A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=rTO+8EZY; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rTO+8EZY" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5aebba706b3so1542150e87.0 for ; Thu, 02 Jul 2026 02:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782983065; x=1783587865; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=ltAucTOR/5O5x3cPBkQD7HWTrR+has2ZItj9F0GdEnw=; b=rTO+8EZYWQNNemN91L7wk1YJFGDYyzSLbj177WjCzlDKSJm3woCmJ16Imnx5aVJV6r QRGg2lsRK/jv+I1yJM+Pl8QGzp2wXyLKwvJa2CJiW5eZ08q63+kuHnU8QX4+x+demCGl Bci8l5XkmOiPonZcbIRGmST/dmcLFY1PdimbcTOQlmU4BVvwDU5T+WonbHNdJqj+S2BV uCsbcLCWOUmn5gtn8pyW+Lg7U70VqBJvVB9JatHSeLiIYMDPuLzk+If4TWDxgkz6tNA/ Zkg4U7cqUIL7X/HeWpg5NQPXotD0Vl7u3geYpxcr8gpIK1Gh4vxAs08/5Cw2Fjn4bZKP JW2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782983065; x=1783587865; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ltAucTOR/5O5x3cPBkQD7HWTrR+has2ZItj9F0GdEnw=; b=iCkTqg1eUm6IReQcQISCQ+ihGNGJ+dL76bVSKrBVLoDCxHsYPKarkteOGNgPa4jU2q mnyIZyYP0/APVCD7NN6MRaB0s+txzt/QDFZBR/aH59zOFSfq6aEw6O8mmsmA6pbyNA1v IGgA4SqpI0zJJX9wAcXH+stK+cXGw8+csUfqRHOQ7IoRaaKTIDMKNR1WzLQkvgB7FuKa VvrnoJDlfks2qxqgJ+aW0HPNtA8wNgdxegR5FKJpS0EYQxAX/yixhlt1yx0XoPxOkkFn y0LzY7cZF92uXL5sTJHF7q6ZTZCWPGQl7tY/QPnqI5VdW1mfrhribexqbx0BBU7mD40P AOOw== X-Forwarded-Encrypted: i=1; AHgh+Rofp/LfQbUQxyBksv46n4Lxr8iJXJUGAizV0eVvzfJHhlk5eJhEFb2XusQbNOGTw6zQrKpfSdIZ8dxv9Io=@vger.kernel.org X-Gm-Message-State: AOJu0YxscPBnAUL8J2YKCRWLpw6hfsvUFA92bhvpIyGEZ7ymKiBrgBqf rTsXtRHlGtMxMMcnhlmIXsGR4sFS9ix+zDFN+icnEyCqSLtjZmpbhrXo X-Gm-Gg: AfdE7cnCTGYapcXam1xM+ri6mkaQZONL69fW7WMS+KDWgTsyVyKhSGByB32JVX9SnUn EZDJlnCvsaj4Ig2v9rAO8mQ76va6pY+CDnaa5Ckc/ikq6dIifjVToU0QlyUQA/RTSdgOwEnQ/U4 t4TDkeICdTRYzyDdiqf4L2xZFNRm8wCOfUHQo4un7qV57DYdE2AghWhKKyiGcFt5QGLrmEXYEGJ osJ5LDvY4fWuVjhzHW/WDwBBB/WZMfcwXc+bsviTGDm9jiT8zZ1VKUsY+gvNP725Qpm0XhpNbe7 KYeHV7AcXYQSPc1C0m4VDTOe1VAgpoiKLmb4hchNQr5xYlmB2RNGnNf68SKNF6Vvv9wp+rNHurT VxxK4wZSxIFkc/BgweNPyX0f2G+Rcyvvyc7j5s1YbWdRxhJT/YxDqcgjXcBhQldxm45VZG0X70T RK25KmQvLGC+UB6QLF5oCo6RvtP+JwhNlQ/9jxraMU4d1Rmy7vrnlMlQ== X-Received: by 2002:a05:6512:1556:b0:5ae:bfa0:54f1 with SMTP id 2adb3069b0e04-5aec743317amr986635e87.59.1782983064322; Thu, 02 Jul 2026 02:04:24 -0700 (PDT) Received: from pc636 (host-90-233-199-119.mobileonline.telia.com. [90.233.199.119]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5aec899a3a8sm547824e87.31.2026.07.02.02.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2026 02:04:23 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Thu, 2 Jul 2026 11:04:21 +0200 To: Wen Jiang Cc: Andrew Morton , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, urezki@gmail.com, baohua@kernel.org, Xueyuan.chen21@gmail.com, dev.jain@arm.com, rppt@kernel.org, david@kernel.org, ryan.roberts@arm.com, anshuman.khandual@arm.com, ajd@linux.ibm.com, linux-kernel@vger.kernel.org, jiangwen6@xiaomi.com, shanghaoqiang@xiaomi.com Subject: Re: [PATCH v4 0/6] mm/vmalloc: Speed up ioremap, vmalloc and vmap with contiguous memory Message-ID: References: <20260618084726.1070022-1-jiangwen6@xiaomi.com> <20260624195704.5c29c0353163babb721585ca@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jul 02, 2026 at 02:35:24PM +0800, Wen Jiang wrote: > On Thu, 25 Jun 2026 at 10:57, Andrew Morton wrote: > > > > On Thu, 18 Jun 2026 16:47:20 +0800 Wen Jiang wrote: > > > > > This patchset accelerates ioremap, vmalloc, and vmap when the memory > > > is physically fully or partially contiguous. Two techniques are used: > > > > Thanks. > > > > > 1. Avoid page table rewalk when setting PTEs/PMDs for multiple memory > > > segments > > > 2. Use batched mappings wherever possible in both vmalloc and ARM64 > > > layers > > > > > > Besides accelerating the mapping path, this also enables large > > > mappings (PMD and cont-PTE) for vmap, which are currently not > > > supported. > > > > > > Patches 1-2 extend ARM64 vmalloc CONT-PTE mapping to support multiple > > > CONT-PTE regions instead of just one. > > > > > > Patch 3 extracts a common helper vmap_set_ptes() that consolidates PTE > > > mapping logic between the ioremap and vmalloc/vmap paths, handling both > > > CONT_PTE and regular PTE mappings. This prepares for the next patch. > > > > > > Patch 4 extends the page table walk path to support page shifts other > > > than PAGE_SHIFT and eliminates the page table rewalk for huge vmalloc > > > mappings. The function is renamed from vmap_small_pages_range_noflush() > > > to vmap_pages_range_noflush_walk(). > > > > > > Patches 5-6 add huge vmap support for contiguous pages, including > > > support for non-compound pages with pfn alignment verification. > > > > > > On the RK3588 8-core ARM64 SoC, with tasks pinned to a little core and > > > the performance CPUfreq policy enabled, benchmark results: > > > > > > * ioremap(1 MB): 1.35x faster (3407 ns -> 2526 ns) > > > * vmalloc(1 MB) mapping time (excluding allocation) with > > > VM_ALLOW_HUGE_VMAP: 1.42x faster (5.00 us -> 3.53us) > > > * vmap(100MB) with order-8 pages: 8.3x faster (1235 us -> 149 us) > > > > Nice. > > > > > Many thanks to Xueyuan Chen for his testing efforts on RK3588 boards. > > > > Indeed. > > > > I see Dev had a good look at v3 - hopefully he (and Ulad) (and more ARM > > folks) have time to go through this. > > > > Is there any effect on anything other than arm64? I'm wondering how > > much testing these changes will really get in mm.git and linux-next. > > > > How is our selftests coverage of these changes? Is there some existing > > selftest which will exercise these new features? > > > > Hi Andrew, > > I ran all test_vmalloc subtests (run_test_mask=0xff) on both ARM64 and > x86_64, comparing base (v7.0.10) against the patched kernel. > > All test_vmalloc subtests passed on both platforms. I do not see any > functional or performance regression. The small differences below look > like measurement noise. > > ARM64 (Radxa ROCK 5B+, RK3588, pinned to CPU 0, performance governor, > 5 runs averaged): > I think there are still comments to this series. One from me about naming and there is one more from Jain here: [PATCH v4 6/6] mm/vmalloc: align vm_area so vmap() can batch mappings Could you please have a look? -- Uladzislau Rezki