Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3228961rwb; Mon, 5 Sep 2022 08:17:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR4x/eXRAjYj9OWpgHiNFR2pTplMBeNB44zZEywC8C5UDGutfQrOMfX0mn8uWVHXb3iQZ0OR X-Received: by 2002:a05:6402:1211:b0:44e:b250:633d with SMTP id c17-20020a056402121100b0044eb250633dmr1585149edw.2.1662391040164; Mon, 05 Sep 2022 08:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662391040; cv=none; d=google.com; s=arc-20160816; b=kM54dUUlAcvUT2XLvgcOzXBVA1slIr5YMkqqBCw4eX2fkTwC14CykkgUx45aXA/BE/ 3GMt3hgKkbgj4wQSk8x4WfEynPchn7gjlyjzUWso5k4sX9nwNV0wP7TJMiwY+NKZgaoM O50rdIw9wVDwRLLupAxNkOELagMaFIYG/1jA4qVDGTeuRXG65NqnxBWLCBs0FifUY+8A sGGufbO2f4ays5mWAcOvtDW7hIqRoPz/6m3L+MpCHm3PD7lRZdEOQdPal2X4jkQOMMmn WTcBID6WBAaTNaQTyCJgxM6TnyieIk2tWChNCwLBZWZsfyyrnNAa6CTdPAXQkq5qzRKI nlnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6t4MbpJQJStzKZCv+OMTP4pypmv5BkHcUxpFt6TDwXY=; b=uq0bWYEuLmgxcLrO+f9WTOoaz5KLXHH41rQJjPwfgtxYWNroJgyjFinBy4Ziw5jkQ9 PJnJCSxw8CgCxEqP3aq6p6axfg9twsUGijIqiqnqQYslddHbkMzOlsZwPh3GQGxFjjcx pdqTqSOqcXOgygnoJRz8YFH0z92KMjtk7v0wuHrS0JSHuGakOgND/JRgaiN+m6c06HDI 9B86BSMo9nT6YuD3cbK/G7KlOk9KmHk4cccbxTSESDyuTIMJwrv8gsCWhWynCQnjYEAx fMCYJTgaYaAAY3Yf5OwsmMaRVtiOFWwEQZZz2UYunpBLZh0onQ8ZriGBKclAh9qz02mh R+0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020aa7dbca000000b004488373d5b8si7383497edt.24.2022.09.05.08.16.55; Mon, 05 Sep 2022 08:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238292AbiIEOeM (ORCPT + 99 others); Mon, 5 Sep 2022 10:34:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238137AbiIEOeJ (ORCPT ); Mon, 5 Sep 2022 10:34:09 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B16E5A883; Mon, 5 Sep 2022 07:34:09 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 3D51A68AFE; Mon, 5 Sep 2022 16:34:05 +0200 (CEST) Date: Mon, 5 Sep 2022 16:34:05 +0200 From: Christoph Hellwig To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , Greg Kroah-Hartman , Dan Williams , Jason Gunthorpe , Christian =?iso-8859-1?Q?K=F6nig?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy , Martin Oliveira , Chaitanya Kulkarni , Ralph Campbell , Stephen Bates Subject: Re: [PATCH v9 3/8] block: add check when merging zone device pages Message-ID: <20220905143405.GB5813@lst.de> References: <20220825152425.6296-1-logang@deltatee.com> <20220825152425.6296-4-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220825152425.6296-4-logang@deltatee.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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 On Thu, Aug 25, 2022 at 09:24:20AM -0600, Logan Gunthorpe wrote: > Consecutive zone device pages should not be merged into the same sgl > or bvec segment with other types of pages or if they belong to different > pgmaps. Otherwise getting the pgmap of a given segment is not possible > without scanning the entire segment. This helper returns true either if > both pages are not zone device pages or both pages are zone device > pages with the same pgmap. > > Add a helper to determine if zone device pages are mergeable and use > this helper in page_is_mergeable(). > > Signed-off-by: Logan Gunthorpe Looks good: Reviewed-by: Christoph Hellwig