Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp850868rwi; Wed, 2 Nov 2022 20:02:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7FE7UignXUMIgRJz76Yq/FXB5XzsjczJ/FR7j1l4gbjWwvRJDPOKsfOkrmciHCMwHW7yFI X-Received: by 2002:a63:5a08:0:b0:43c:9fcc:cc54 with SMTP id o8-20020a635a08000000b0043c9fcccc54mr24197377pgb.229.1667444556779; Wed, 02 Nov 2022 20:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667444556; cv=none; d=google.com; s=arc-20160816; b=qasWwmfFMspeBRgUr6sbTLQ4I68etNXuYAoFDg4Ogz65ibky5dJCqVC6k5dCxXAowe 1sRT0mxgU68cejIIc5ffsTHASVjJhNQAbNf9lb33HhGhsVbhA8VHtjn0mfzCXMvIb4qI PdRXTMWnKbg/ke4ig4timN/ruKtao3CmpP0vDouy0qoriLxL/NsRUglEzxAG94xHIC2p +ULKankgZnt/J66vltrLmsibzoMYhgT/2NlonK7kOAHxpL5F/gTEsOpEL02PMYaPO/73 bVyD5HgOx6jjBz7sHec/eIA3ZJV6lvtbWyqTksDYYyFMe4CsjeuAn2N0yvgHnbFU5Cxk 1Ntw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bj1OXM86++Ax5WK9NQpXE8onmLsfEj10gyUi+TO3JfE=; b=ecmSnsbKwpAxPnnuIagrQKZGcp4EkQgb5GhfYu15w50pGTOMP/CQtm+8ab36eLXZH+ qA4CRh/mFokV6Fz2BUjJ0pgeIaG7UbXOcRWZxP7QJfIARHl+6V9UuYTS+Wzhx9YVO3dn bwRQxw7xzbUp6SWJHM4rAswhHcOWA2DVxZ8Wbz93/m17tbc/10xQXMzhjP8pq7InPvdv 1aVXKHivLG0qi4cyEPoCvmCQWvr/JQNkMrz/W3mwj2C8MT2BvMmfAUZotJGmTPamgPkn 0PS+MUk1IuSedSv0nJr12NikYp6fWq3W+FRO3Vhz0xaNzs4xzdSXactyqXuESTcKbTwv SneA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ROLVFzyL; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020a63550e000000b004597ddac21csi19598765pgb.80.2022.11.02.20.02.21; Wed, 02 Nov 2022 20:02: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=@chromium.org header.s=google header.b=ROLVFzyL; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbiKCCoG (ORCPT + 98 others); Wed, 2 Nov 2022 22:44:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229823AbiKCCoD (ORCPT ); Wed, 2 Nov 2022 22:44:03 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5E4312AE2 for ; Wed, 2 Nov 2022 19:44:02 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id y4so660051plb.2 for ; Wed, 02 Nov 2022 19:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=bj1OXM86++Ax5WK9NQpXE8onmLsfEj10gyUi+TO3JfE=; b=ROLVFzyL5oaa51yfOrh3XK/kCTxN0hPymFWPR3PKxJnXkCAX0o6mTw6kJ3TcfIvztf G+Z9C5gJr3mVzv8rtbVtGHhvr4Px83/zMQ8VKbOhbEo1+x4vWdAG2CvE1ytt1MJtR/Io UoLUAPfhJMtiwLBIwi0KIOH6ZXSixbLexAT9o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bj1OXM86++Ax5WK9NQpXE8onmLsfEj10gyUi+TO3JfE=; b=vhbuWU4AS3HoUCKqZYN3HdZGCdMaEMykAyQ49KHqAVfVHugahJO1EzdCG7GvbJiq/l BWggFV04VlryNlvMpKorihfBRycu/95OfuPzh6PE1tYlT01cnmDgdyqgCQ/Ll/0Fo8Ck ubAi+35ZElvN5tj7ID1o0qpiiz6LT54/mAz3WoXrm65UPsXEHalPwvw217PjrI3qC+jO NW3fEg3xRx8tnJkP3tYHf/rqqyZtoat7Sxo2LVpDGMq2f4kwki3S4CsgPhgaY8LE6K4A yqlAhQcYQ+HxPzVX38gW/o6OUPqmpqag/DyjtIH4zbDp/d/gxe9VdSbWVsexNdMDJP24 FPww== X-Gm-Message-State: ACrzQf2Cz1g1fCu/ymPPROo509RWp9p2BI1JczvCbHleHakZdtJzJ7Ls QsasFaG/i1qIKLm5f9Gpq42mGA== X-Received: by 2002:a17:902:7294:b0:187:146c:316f with SMTP id d20-20020a170902729400b00187146c316fmr22170504pll.149.1667443442354; Wed, 02 Nov 2022 19:44:02 -0700 (PDT) Received: from google.com ([240f:75:7537:3187:f22:e30:374d:5a2b]) by smtp.gmail.com with ESMTPSA id i7-20020aa796e7000000b0056b2e70c2f5sm9103526pfq.25.2022.11.02.19.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 19:44:02 -0700 (PDT) Date: Thu, 3 Nov 2022 11:43:58 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , Andrew Morton , Nitin Gupta , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv4 3/9] zram: Factor out WB and non-WB zram read functions Message-ID: References: <20221018045533.2396670-1-senozhatsky@chromium.org> <20221018045533.2396670-4-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 (22/11/02 13:20), Minchan Kim wrote: > On Tue, Oct 18, 2022 at 01:55:27PM +0900, Sergey Senozhatsky wrote: > > We will use non-WB variant in ZRAM page recompression path. > > > > Signed-off-by: Sergey Senozhatsky > > --- > > drivers/block/zram/zram_drv.c | 73 ++++++++++++++++++++++++----------- > > 1 file changed, 50 insertions(+), 23 deletions(-) > > > > diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c > > index a8ef3c0c3dae..94c62d7ea818 100644 > > --- a/drivers/block/zram/zram_drv.c > > +++ b/drivers/block/zram/zram_drv.c > > @@ -1314,8 +1314,30 @@ static void zram_free_page(struct zram *zram, size_t index) > > ~(1UL << ZRAM_LOCK | 1UL << ZRAM_UNDER_WB)); > > } > > > > -static int __zram_bvec_read(struct zram *zram, struct page *page, u32 index, > > - struct bio *bio, bool partial_io) > > +/* > > + * Reads a page from the writeback devices. Corresponding ZRAM slot > > + * should be unlocked. > > + */ > > +static int zram_read_from_writeback(struct zram *zram, struct page *page, > > How about zram_read_from_bdev? As far as I can see, we already have that one, so that name is already taken. We have read_from_bdev, read_from_bdev_sync, read_from_bdev_async, and probably some more.