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 41ACCC433EF for ; Mon, 4 Jul 2022 06:07:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 972D38E0001; Mon, 4 Jul 2022 02:07:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 923656B0073; Mon, 4 Jul 2022 02:07:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 811788E0001; Mon, 4 Jul 2022 02:07:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 6E7636B0072 for ; Mon, 4 Jul 2022 02:07:06 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 44BA46DE for ; Mon, 4 Jul 2022 06:07:06 +0000 (UTC) X-FDA: 79648384452.31.23BD303 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf14.hostedemail.com (Postfix) with ESMTP id 8D718100020 for ; Mon, 4 Jul 2022 06:07:05 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 49FFF68AA6; Mon, 4 Jul 2022 08:07:00 +0200 (CEST) Date: Mon, 4 Jul 2022 08:07:00 +0200 From: Christoph Hellwig To: Logan Gunthorpe Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Stephen Bates , 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 Subject: Re: [PATCH v7 16/21] block: add check when merging zone device pages Message-ID: <20220704060700.GA28966@lst.de> References: <20220615161233.17527-1-logang@deltatee.com> <20220615161233.17527-17-logang@deltatee.com> <20220629064629.GC17576@lst.de> <7da06e08-7dd1-f37c-4382-bc59a1b1e819@deltatee.com> <39bf0071-0acf-12fd-3d3e-06dfd87bb409@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <39bf0071-0acf-12fd-3d3e-06dfd87bb409@deltatee.com> User-Agent: Mutt/1.5.17 (2007-11-01) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656914826; 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=7bGi9xI4iorkcVbln3g/qStzSU7lPTlpqpORsarXxE8=; b=XikRG9TKAxGLl/7iFzid9DVRHosRTKEZ41C8XYGxQ0+QVplTDkNl3jnwily5TEmHOxJKRW uRJx6PTExxZs6Lj83VyADmVOgd4tkpkhyAoDd4ZXVWEX8cOnSR3qUeMcprHDvMhA2OcrtE swr2D1dBSas3d4FOv7+LgneCa07c/UE= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; spf=none (imf14.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656914826; a=rsa-sha256; cv=none; b=EyplJk4gymSRlBB8pCClhu7YrJACLEtZ+1JB9JQ+n6tNNcBocfdOfHZaJi+wwMzXr1TkDG 2Vcw6eFOgP2Kv4gt0XojIwZYXTBJJWkpj6f0GUfZ1OJ3DnVWQzKNC6qf6baXEUfEGdiB79 rnzZO6T3HvzNdktm8j/WkLfjVo9BOHY= X-Stat-Signature: g19tqs8ceo8q1cwgth3s4hwz9xfknepx X-Rspamd-Queue-Id: 8D718100020 Authentication-Results: imf14.hostedemail.com; dkim=none; spf=none (imf14.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-Rspam-User: X-Rspamd-Server: rspam02 X-HE-Tag: 1656914825-41691 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, Jun 30, 2022 at 03:50:10PM -0600, Logan Gunthorpe wrote: > Oh, it turns out this code has nothing to do with REQ_NOMERGE. It's used > indirectly in bio_map_user_iov() and __bio_iov_iter_get_pages() when > adding pages to the bio via page_is_mergeable(). So it's not about > requests being merged it's about pages being merged. Oh, true. > So I'm not sure how we can avoid this, but it only happens when two > adjacent pages are added to the same bio in a row, so I don't think it's > that common, but the check can probably be moved down so it happens > after the same_page check to make it a little less common. Yes, looks like we have to keep it.