Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp93770pxb; Tue, 26 Oct 2021 22:14:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyG944r9n6avj36icY7Bhh1CyggWsxWvD0xt4mEHVHqf7KqVFXF1b38mwKAikcVR0pjKTvP X-Received: by 2002:a17:902:e54f:b0:141:490d:4e62 with SMTP id n15-20020a170902e54f00b00141490d4e62mr9886415plf.5.1635311674881; Tue, 26 Oct 2021 22:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635311674; cv=none; d=google.com; s=arc-20160816; b=x5P2dxP77gyw4UKVb3Qqd3QkEfo/FVKlQeXeC15cSjBT+otHNktZ5gpClf+RoTRH19 J24ifD8TaLobZc4svzUy3hoyD7taBrFYC7CnMRMbtiGQyRyl3pSmHOFrXr8SfR66pK3O /ArOKlzvJsUFRdWK1NIxCHMfsK3oNtOvUvyi5QTo0uYv7f1bmjBO3VB5eZcx20GCPMno Wgjgf/jp2DhZ6yZ6c6eLUrMr7Wo+gmMtoLoJF/3119S5vrNkf6EuXfjH6ZuIDuGMBrQ/ /RKE8Lrgyrq1sJ24+E8pq61VTyDkNijMZB59bAUhYgR6T6APqNy5sfyRsEOozL+YyqLB sLdg== 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:dkim-signature; bh=3Tjz+lVq4oCNPYNd2IGwBHt10T5b5l25ZLdzDs0m/hE=; b=prVXwqTWygthOhbkRxA66j8jiIhble6Bsuvk3ASvY7CgdqWHSYeGb3YAxj8xNC7ERm JoQhMcJdHTuSt3l30aico9i8Amt216iASKx8b2LvlYmoM+bCGR8C22Bmc27yp4eMVlDW smKn6APTS/m3oJFQIJKljw6plPlWnQ2dkah9ShrKFP5efTVVmBkZKslS6X8q7vb8Jr90 MSDm4/Oqm79TZ5q+X6Wv36wTPYTR7t6T0IcQyC47IfixmxsPTY22VsxHbIRWnaNbECHY ZwMzKgLxr74MQov1W+JGuHOdTQI6ZF3YC6kNNNLJBggFgaoLQUt1pAqt6h/sYR7uWr/X vDgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=S08qK0hh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si5492181pfu.229.2021.10.26.22.13.38; Tue, 26 Oct 2021 22:14:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=S08qK0hh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238089AbhJZSL7 (ORCPT + 99 others); Tue, 26 Oct 2021 14:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238092AbhJZSL4 (ORCPT ); Tue, 26 Oct 2021 14:11:56 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3773C061745 for ; Tue, 26 Oct 2021 11:09:32 -0700 (PDT) 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)