Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5187076rwb; Mon, 21 Nov 2022 18:18:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf4UUFejEXY73U8+VzcSgQxM53EVO2atjeufAcqTyJC9agou/fIn1vd2sXrfiqRGioylMZfM X-Received: by 2002:a63:5802:0:b0:46f:59af:c1f4 with SMTP id m2-20020a635802000000b0046f59afc1f4mr3672537pgb.344.1669083482431; Mon, 21 Nov 2022 18:18:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669083482; cv=none; d=google.com; s=arc-20160816; b=lIlSxX2E8hHftABddnPVuZMQod+5JgLsH4kuKSGhpkjARf2ylbGi2o52TMZ1xM0pg1 +QLTU6F7WPS+aLD0OTJJuChOl+xZ3Mm6pbFMYeOSycOYVaApJ6C1yrvtuU0PPNhqg+vT SfWXfQxgwPVSLQ79cKeyvWslnyxlkB/qcGWMffSaJzgbtgVz2y2hRYJxhD4JAj8Nql0g 3RdFVJ01jiySxMZeNXgO0EFA96A5c1JmxCexNmkLBgpcrRWjRhkZWNuXt+OcTcBZCqx2 IhnBIMrw8jwNODzIPG6eO/n2WtIxGHdI4seIotmkmtnc4SXqXswR9JuURVHg3JFP1HFi +FDw== 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=SVHrNvmN2aKc4xwWxCNYKIFTFpQYBYiPFTCfwC3xsW8=; b=Qqtkw4RtW8H5Jn8pfx3DDXOEMzL43g8++IJpfYU5S7KTsSLpFKvHnpSiYQSsJ/OFuL ulD0T/W19UMWa1Ox0IEDqm7WVGCEpkRrtsjVf5uRNME1XQ8zEl2oPJ+nLwDTN+SHyAt4 aen8O+6my6wV8U16UyRJfnjifodRh+4+fmmRmAGlHhQEzyWzvpfTUL6oPd1KnHcN0ZUM ajSfYAAypkQ7dakyRZC3vm1QfV1rS8R6e4BrPSghlXVL0ldt71B1cxUaFBEPOPHpbk8A fywTQzCmkJ2zOQW0gQKfSPkzKRPErbGyglEpURhWfYruLBCNKpLtGhOl+pY1N/c2dpyB pmdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="G/z6TQzB"; 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 y18-20020a17090322d200b00186b45948d1si14652612plg.125.2022.11.21.18.17.51; Mon, 21 Nov 2022 18:18:02 -0800 (PST) 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="G/z6TQzB"; 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 S231717AbiKVBqj (ORCPT + 91 others); Mon, 21 Nov 2022 20:46:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232375AbiKVBq1 (ORCPT ); Mon, 21 Nov 2022 20:46:27 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5B8CC695A for ; Mon, 21 Nov 2022 17:46:26 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id g62so12976379pfb.10 for ; Mon, 21 Nov 2022 17:46:26 -0800 (PST) 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=SVHrNvmN2aKc4xwWxCNYKIFTFpQYBYiPFTCfwC3xsW8=; b=G/z6TQzB2xX/UeJGfPJ90z8DHKYOhsUZ9iGd6p+kIBndZj/htaZ86BJIYgelduK8na gMmniUO5ITM9E54+jjYQWpDvF40GbAak8BYQTi+uIZQk6dHbtOsBxGm2oT9QdBaopne7 RuZfU2zrSOnAyG1GGRsCsFqEwU882/3KIc5Dk= 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=SVHrNvmN2aKc4xwWxCNYKIFTFpQYBYiPFTCfwC3xsW8=; b=D0c0TLpm7vX6wlOnwzFGPk5ThmNTpCSIcc7/AH98D+qnkUqo/+HhzrlXH0UcnLPaMO Mw0YGHPUEno+2F+d3DOi+bOov8nrJV77mimQf7fa9WqJd4Ewy3hIA42QPlyeFBk9Mu5R l9+etg5pL2ZjW0yCt5AavIiXtTuKGpUYdl3SEiKCHUzOKPi6qH0MBhKVYQP42AaXKwz1 Ch/Uv/nYOjIkAv3K11E3B1vN+QMioUg99Myhpf1e+FAmXtfsqfkJF7vSbZTHNRAY85JM wkvpQe0ksd/MOVm5fF+9TTq/jhmjtag+RmcGpUn6yNw90TOvX1+BUkfJl81DJfRvn7dA 67RQ== X-Gm-Message-State: ANoB5pmUcrrs6rCrYLh1D6WuSCN9ojifMu0emvwec60F9TPT/+huZqsK 0uczq4jM5YihTyTwdOQAf9VV+g== X-Received: by 2002:a05:6a00:3004:b0:56c:dba2:30b with SMTP id ay4-20020a056a00300400b0056cdba2030bmr23051360pfb.72.1669081586274; Mon, 21 Nov 2022 17:46:26 -0800 (PST) Received: from google.com ([240f:75:7537:3187:e258:71ac:37b7:2d52]) by smtp.gmail.com with ESMTPSA id j5-20020a170902c3c500b0018853416bbcsm10452842plj.7.2022.11.21.17.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 17:46:25 -0800 (PST) Date: Tue, 22 Nov 2022 10:46:20 +0900 From: Sergey Senozhatsky To: Nhat Pham Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, minchan@kernel.org, ngupta@vflare.org, senozhatsky@chromium.org, sjenning@redhat.com, ddstreet@ieee.org, vitaly.wool@konsulko.com Subject: Re: [PATCH v6 2/6] zpool: clean out dead code Message-ID: References: <20221119001536.2086599-1-nphamcs@gmail.com> <20221119001536.2086599-3-nphamcs@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221119001536.2086599-3-nphamcs@gmail.com> X-Spam-Status: No, score=-2.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/18 16:15), Nhat Pham wrote: > There is a lot of provision for flexibility that isn't actually needed > or used. Zswap (the only zpool user) always passes zpool_ops with an > .evict method set. The backends who reclaim only do so for zswap, so > they can also directly call zpool_ops without indirection or checks. > > Finally, there is no need to check the retries parameters and bail > with -EINVAL in the reclaim function, when that's called just a few > lines below with a hard-coded 8. There is no need to duplicate the > evictable and sleep_mapped attrs from the driver in zpool_ops. > > Signed-off-by: Johannes Weiner > Signed-off-by: Nhat Pham Reviewed-by: Sergey Senozhatsky