Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4640828rwl; Tue, 28 Mar 2023 09:19:36 -0700 (PDT) X-Google-Smtp-Source: AKy350aEaFLKz/BnaPy3E2VPyPy1ydGvp2Hr/+vMVKsDWIkQbJtaRBp/ZoIdQ95SIJT4hytzjSyl X-Received: by 2002:a17:906:3485:b0:922:c4f8:806c with SMTP id g5-20020a170906348500b00922c4f8806cmr16074981ejb.60.1680020376430; Tue, 28 Mar 2023 09:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680020376; cv=none; d=google.com; s=arc-20160816; b=pth+yIdnJDxW1DZ1T1D/JzlYR2eF1W3VweCdhm4hBQBzqP7SZ1sV5n39yK8XH4gUOH 0LFqCpGhxFMYzXy+h+hP/xG56Nc0BtZzMLmA/QjiRiLmA9/ov2Wiscxu2BOzKRExuboe ZUm1d+DfH+VC0H5/vynN8WEFiCDvL74TxbM10V4xvy7ItvLBEJkfczN3BFp6hpS0lJY9 W/dBmX5UzGR3F41YwqauZ9/6A8AfBavo8VcBPLR5s1uSv6n6FOttZGXN/HQLOCXqGEg1 6cxIzfCjlw8jMxWGfI0yH0WjM/g4Qlt5+eBQfsdpmlNRD6XgIlMRwKsPUnfQajLoH8Aj JcTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :in-reply-to:from:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=mqLdRjs5YCQMtwNo6iN1eWz3Bgl+agNA8ISno6XaIPg=; b=tLOJc+ZNnJo5vhD8+rlcfKteFmIOaf2hC0aUWHZ1BT72ZzAiP+KiDSYuq8Lo8yBw0q IFu2/DFUtoIlPHfPGK4hvTd/D6jgGj5Rw0LJ/NC5shkMAw++Y9AC7IteZE+UQCug3XPm /li+yYo++C0CDfn479hK20klgl0dySepwYgFlOMn4DZHJZ0FbpcRTDhdyw5IElJUMqFC WgoVmP7qXaQCewSBWqeE92G0BEtms8vYquhhn/SIwWT4KPy5En9sJTdSEU23JrMbKQsJ gVuRP1T73UwJZUaUtZurEgt2xCdZmSzYeMxJOMfI+N3ELC74LrsLzEXPOD6gX3oEe5LI AnWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WYxOq+kw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a5-20020a170906368500b008e0bd541c5asi29114775ejc.449.2023.03.28.09.19.12; Tue, 28 Mar 2023 09:19:36 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WYxOq+kw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233036AbjC1QRT (ORCPT + 99 others); Tue, 28 Mar 2023 12:17:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232720AbjC1QRS (ORCPT ); Tue, 28 Mar 2023 12:17:18 -0400 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBDCED51B for ; Tue, 28 Mar 2023 09:17:16 -0700 (PDT) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20230328161715euoutp027558a7e8bfd2016f387c267e576d5d4b~QoYC6jd9D2351323513euoutp02T for ; Tue, 28 Mar 2023 16:17:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20230328161715euoutp027558a7e8bfd2016f387c267e576d5d4b~QoYC6jd9D2351323513euoutp02T DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1680020235; bh=mqLdRjs5YCQMtwNo6iN1eWz3Bgl+agNA8ISno6XaIPg=; h=Date:Subject:To:CC:From:In-Reply-To:References:From; b=WYxOq+kwk7VUFdcCKV9Yen8Bm5utlrcKFTrH7FgZE1ZS8ez7qAN4QOVyaKYpXI8+b Yvd9QgMFijBu/sxxRSDnx75/hMhBWOIWDKX2xhjMwa4a/bvi52/XM93rlcO1fwPN4D xHvTiWz/AzJGdzoK2om5MZn82pSyqDoh2SV5tRB4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230328161714eucas1p24ad41a96092cf0b451efd29aa33f047b~QoYCAI75o2141921419eucas1p2B; Tue, 28 Mar 2023 16:17:14 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id E3.72.09503.A0313246; Tue, 28 Mar 2023 17:17:14 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230328161713eucas1p263e3a9167f956e10e522c91ae316b244~QoYBmJhZk1672516725eucas1p2N; Tue, 28 Mar 2023 16:17:13 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230328161713eusmtrp2aefa500222b07e9fb50fbfd5a23e1f5c~QoYBlbmRk1088210882eusmtrp26; Tue, 28 Mar 2023 16:17:13 +0000 (GMT) X-AuditID: cbfec7f2-e8fff7000000251f-78-6423130a41e6 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 81.97.08862.90313246; Tue, 28 Mar 2023 17:17:13 +0100 (BST) Received: from CAMSVWEXC02.scsc.local (unknown [106.1.227.72]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230328161713eusmtip11c9b253d7b3c5c5f3a304baaefc01afc~QoYBZuuzm1480014800eusmtip1a; Tue, 28 Mar 2023 16:17:13 +0000 (GMT) Received: from [192.168.8.209] (106.210.248.108) by CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 28 Mar 2023 17:17:12 +0100 Message-ID: <5865a840-cb5e-ead1-f168-100869081f84@samsung.com> Date: Tue, 28 Mar 2023 18:17:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 1/5] zram: remove the call to page_endio in the bio end_io handler Content-Language: en-US To: Matthew Wilcox , Christoph Hellwig CC: , , , , , , , , , , , , , , From: Pankaj Raghav In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [106.210.248.108] X-ClientProxiedBy: CAMSVWEXC01.scsc.local (2002:6a01:e347::6a01:e347) To CAMSVWEXC02.scsc.local (2002:6a01:e348::6a01:e348) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOKsWRmVeSWpSXmKPExsWy7djP87pcwsopBl/ucVrMWb+GzWL13X42 i9eHPzFa7N88hcli5eqjTBbtd/uYLPbe0rbYs/cki8XlXXPYLO6t+c9qcXL9f2aLGxOeMlos +/qe3WL3xkVsFuf/Hme1+P1jDpuDgMfshossHptXaHlcPlvqsWlVJ5vHpk+T2D1OzPjN4tEw 9Rabx+6bDWwev27fYfX4vEn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EiY7 MOc33hD3+D1RiaU4I9FQi7moOBEA8MWRRq8DAAA= X-CMS-MailID: 20230328161713eucas1p263e3a9167f956e10e522c91ae316b244 X-Msg-Generator: CA X-RootMTR: 20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1 References: <20230328112716.50120-1-p.raghav@samsung.com> <20230328112716.50120-2-p.raghav@samsung.com> X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 2023-03-28 17:19, Matthew Wilcox wrote: > On Tue, Mar 28, 2023 at 01:27:12PM +0200, Pankaj Raghav wrote: >> -static void zram_page_end_io(struct bio *bio) >> +static void zram_read_end_io(struct bio *bio) >> { >> - struct page *page = bio_first_page_all(bio); >> - >> - page_endio(page, op_is_write(bio_op(bio)), >> - blk_status_to_errno(bio->bi_status)); >> bio_put(bio); >> } >> >> @@ -635,7 +631,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, >> } >> >> if (!parent) >> - bio->bi_end_io = zram_page_end_io; >> + bio->bi_end_io = zram_read_end_io; > > Can we just do: > > if (!parent) > bio->bi_end_io = bio_put; > Looks neat. I will wait for Christoph to comment whether just a bio_put() call is enough in this case for non-chained bios before making this change for the next version. Thanks.