Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp1292202imk; Sun, 3 Jul 2022 23:18:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sQAcvCc9ppHU+aWZYHnPgrx6bDec9q5dB10AgsO4hC3eirEI07y7UgU4dlvSghoWrRbo/q X-Received: by 2002:a17:906:9b94:b0:722:f2a1:efb9 with SMTP id dd20-20020a1709069b9400b00722f2a1efb9mr27135581ejc.42.1656915530956; Sun, 03 Jul 2022 23:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656915530; cv=none; d=google.com; s=arc-20160816; b=LajCUFYPn7pN4NN9Mh4jtxCXZRauhnIpWecJhgKVWzvESdaFBB4cvXCIZO1fodFrdi tL5Eg18THIiuATK7e/WkdA+hjxwr7VYZCjES6VfNWuNnC/AjyN8xG1K2gU7TX9gvAdqN fYqOLV+3ROlsJqSHJYBsktsHkf0a+ZI3/l2lpWaRSioa5WRgGhd0cTXBmqGNTeVORgDJ z9uLZfak4q1iFGfFf06XpbUS1sykluGoeiUfjS0TIBDxdoFW5u4IV6IzW2wP4Ebxye1M IR48pu82fFRvmRnDO0rMQfjJzD1z1Gsu0yrrffX01aMpVU8/UAyOXgfdn/DBqu80lfLI Q8/w== 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=7bGi9xI4iorkcVbln3g/qStzSU7lPTlpqpORsarXxE8=; b=VHtWYrcR/WjFTdYdBr3ehOzGBk0W9+J3Kt/FrvjDcqwYNC+9rdsd7e3aGJR8Yi5VLv Ej0YT1F7pAnkrOOPSPHml36LH6kn+S5pQfjKo6oKXWgPfiSh11h3e8clkgDerAw0fkFY EBKI8J3RCn84eCRh76nq9HbKhNQ8MIRUCmoele78/+L0UKvq6XhIH+Sn04ChAdpXEevN G+0NfCRjYz8qF3Mhug24nCyjy9pzEDJaEWTDZmh+90HjnrkqoHL+cj3vf0ySvnvAA0Br mYQgGdeU0OHtg67duoVS/VwoWqHVXkRB8GctDBQDipC1ALmJ4poCzY4a4VkyDBrqIA1g Es8g== 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 v18-20020a509552000000b0042bcd41832fsi10956633eda.400.2022.07.03.23.18.24; Sun, 03 Jul 2022 23:18:50 -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 S232238AbiGDGHK (ORCPT + 99 others); Mon, 4 Jul 2022 02:07:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbiGDGHI (ORCPT ); Mon, 4 Jul 2022 02:07:08 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71531260E; Sun, 3 Jul 2022 23:07:06 -0700 (PDT) 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) 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, 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.