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 DB9B3ECAAD5 for ; Mon, 5 Sep 2022 14:34:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7BEB7801E3; Mon, 5 Sep 2022 10:34:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 76D9F8D0076; Mon, 5 Sep 2022 10:34:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 65D5B801E3; Mon, 5 Sep 2022 10:34:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 5324B8D0076 for ; Mon, 5 Sep 2022 10:34:09 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 2419D40E2E for ; Mon, 5 Sep 2022 14:34:09 +0000 (UTC) X-FDA: 79878276618.05.4569356 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf22.hostedemail.com (Postfix) with ESMTP id A8AC1C006E for ; Mon, 5 Sep 2022 14:34:08 +0000 (UTC) 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) ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662388448; a=rsa-sha256; cv=none; b=NopBhYIJlXpvY1K749HhaB44whDfrBpqsDR34avJE6/aHeQW8RqLWjE7PmDvALu/l0+ic7 6M6tMeccnKT4o41AYsnBAM9R0VBx2GQhm7rl+/WZQpn7rAbPohbWyHmQw7GD68QUHFac2+ nF0wJdIKoWHbkvQ3Yf/pbUvefRmLwoE= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; spf=none (imf22.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662388448; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6t4MbpJQJStzKZCv+OMTP4pypmv5BkHcUxpFt6TDwXY=; b=p0wfWIZt39jGFt9ggen8MvgAwMjbsfcPE5d4cKEhPTaGrz9dDQ9n679baxa/pRiRhlBnEm 7sOsNwPM3V8f9QBOr6J2YXTszm122zdhDJH7Xj/ozjms9P35a+W+poigHfpiGNQmkuCXRg XlKEejmx0dlwigYFtCR6EFf+Uc6MxeI= Authentication-Results: imf22.hostedemail.com; dkim=none; spf=none (imf22.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none X-Rspamd-Server: rspam01 X-Rspam-User: X-Stat-Signature: hpkh73papj34ahc8x4o3nybf8ddw9sy1 X-Rspamd-Queue-Id: A8AC1C006E X-HE-Tag: 1662388448-205729 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 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