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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3779AC433EF for ; Tue, 26 Oct 2021 18:09:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C68C360C4B for ; Tue, 26 Oct 2021 18:09:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C68C360C4B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 437E1940008; Tue, 26 Oct 2021 14:09:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3E721940007; Tue, 26 Oct 2021 14:09:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2AFA9940008; Tue, 26 Oct 2021 14:09:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0032.hostedemail.com [216.40.44.32]) by kanga.kvack.org (Postfix) with ESMTP id 15EEA940007 for ; Tue, 26 Oct 2021 14:09:34 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B5D6F2FDF1 for ; Tue, 26 Oct 2021 18:09:33 +0000 (UTC) X-FDA: 78739376226.10.0F81BD2 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf05.hostedemail.com (Postfix) with ESMTP id 07F3C5087CF7 for ; Tue, 26 Oct 2021 18:09:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=3Tjz+lVq4oCNPYNd2IGwBHt10T5b5l25ZLdzDs0m/hE=; b=S08qK0hhKI9+4O/T3ksI+N501W U02cVVD35YfWK5y4rHUjFKj+utv9T2O4ucSENENpzkFGYvvX3lbTxoniBVVoeteK+J46hg2x+hYEa OpbdEyt2fS0INss6AoYuRUGsUfW6lXBeGzs57jzPS9Z9XGuofqMpMUVRKaoZwFkMyaE9a2XSeNaTg jZE0OFBDiVmRIvfCW/TJMjQ+BGuz5t9kgdMyiTckwOCj1ogcNLo7k0UVX8V4f1eDrI5gLMpa9UvQ1 GoMKSqiPyRQoAymznb27Y8dDiVPLT/f3ooWFsHAR4MkGxp4sSHj3F89qMLALPS3NcrNZdD7HTpvQQ emhLxWTQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfQrh-00H3aS-Ks; Tue, 26 Oct 2021 18:08:19 +0000 Date: Tue, 26 Oct 2021 19:08:01 +0100 From: Matthew Wilcox To: Jens Axboe Cc: Andrew Morton , Linux Memory Management List , LKML Subject: Re: [PATCH] mm: move more expensive part of XA setup out of mapping check Message-ID: References: <49f67983-b802-8929-edab-d807f745c9ca@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49f67983-b802-8929-edab-d807f745c9ca@kernel.dk> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 07F3C5087CF7 X-Stat-Signature: 9wa7wqo7zo8ug1beydgkka6b4ccpdfao Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=S08qK0hh; dmarc=none; spf=none (imf05.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1635271762-188590 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Oct 26, 2021 at 10:01:20AM -0600, Jens Axboe wrote: > The fast path here is not needing any writeback, yet we spend time setting > up the xarray lookup data upfront. Move the part that actually needs to > iterate the address space mapping into a separate helper, saving ~30% of > the time here. No objection to this patch, but it did remind me that I never saw an answer to https://lore.kernel.org/all/CAHk-=wg_-EwefQ_3Osz4iJxTrTk3tfrV53Z7-jaGg=tm9i5TXg@mail.gmail.com/ (and nor did lore)