Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6517160rwp; Tue, 18 Jul 2023 01:19:05 -0700 (PDT) X-Google-Smtp-Source: APBJJlFhv0bNCEQ1rXe41EcQLzh4xgpsD//pTBDzrCrXrBWFpdsNBKdEB/pcOn+4im2h6zfOAS6m X-Received: by 2002:a17:902:ab03:b0:1b7:ecbb:aa06 with SMTP id ik3-20020a170902ab0300b001b7ecbbaa06mr15660610plb.55.1689668345512; Tue, 18 Jul 2023 01:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689668345; cv=none; d=google.com; s=arc-20160816; b=fDx6vgNFeeM3BkOrDXcxLdXDyQD5RYoJNaq56ZQwsGe2+yKPQUEmGJj2e9NhaRQ9rj Eij0cF7l2La1L9MQQ0CIBExx0VQRGaUdEXzEEqsySmH9Xql+887LO/7seBFIPn/z7ntB 1guc6VnX4Og/P4RGVhNCvFEqYk5K99GCb1EZ/qsn2LjP9vPXJs90W21BDLM9vTecRezg xeOdB8aUiqcF62s7V/+CrOJC8IWuU+KurVgPcosC4ExaXSiY9vHEJ6RUI2wcbDK2NMba C4iAonRFIVJrLHuTh7XxULp7DsxgDkku3kRN96oaMq0Ra7BEGmbBAuJOZNbp4C1MHOYX BVew== 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=IUjFu5dPruXh3TEHR0+I/1mPzXw99ve0GbxQPgZtdKo=; fh=++9s/7SeQg4q66yFaJJjOk20oede5VFoIQla5qHutOo=; b=Yl3pxuJbNi+zqkPX76UX/z7qrFwtViy24rCw7Agljrib8ohrNiaK9ukBSZTNFAb3PD Borm4Y8JVrWXy1BJ4E6Ur14xYE3lMsgmen6T9suML75T62bs+0qZKWe/81+Oniz8h0l5 bVADqETwx4WVhoOGlZ+wGsdxsd2zgyI3j4DpU6r15ks5nIkdg4QpY5PglplmTmlQRxFV 6ozU56at3kJF2lZShj83J5re9z94Hn5ljyNQYY/1h3N6AAW1ogQQQIbpVydjNxta0wGw eFytjbkAHdj8SFX+ONp9cnd6dNb08XVR+gINvtfWmYkmz7dZgTlHVBE30Ym8hk8GVhSJ DdXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kGJ93Hcc; 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 b4-20020a170903228400b001b9d8ea026fsi1292596plh.485.2023.07.18.01.18.52; Tue, 18 Jul 2023 01:19:05 -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=kGJ93Hcc; 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 S230046AbjGRHtk (ORCPT + 99 others); Tue, 18 Jul 2023 03:49:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230369AbjGRHtj (ORCPT ); Tue, 18 Jul 2023 03:49:39 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D38B010E5 for ; Tue, 18 Jul 2023 00:49:34 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-68336d06620so5456608b3a.1 for ; Tue, 18 Jul 2023 00:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689666574; x=1692258574; 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=IUjFu5dPruXh3TEHR0+I/1mPzXw99ve0GbxQPgZtdKo=; b=kGJ93Hcc1PZfJTKke9iC3Knd6sVtXpPMTK6oZxNZMlAygny1++zKP5qubQajsp394D +QCwne5/74y3f+THbcppvdLpCg2dW2b4qkdAtQ3Gl4bZSrdL1DOqndZ7Ykw3fp4GNE41 OLn8/k/PlpJYj4XSHhZlDygSflydSm+/tmnWc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689666574; x=1692258574; 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=IUjFu5dPruXh3TEHR0+I/1mPzXw99ve0GbxQPgZtdKo=; b=L2cvGEdrNwst3U51U2xgBCwA+9zFAtTCHSf72Wrdf62xaJaq15LGlbXKfLpNMP6Z2J kPbSGlAURia4D8siDEEIMhOdL1XswcFzuBZ3nUZHeMOPiCIUYtk0m72Uomp/rWMseFVf CmbSEe80GDx2mgxM+8dKKJ7HN6ZuGpVpLhYj8K2iFJreQzS2rblKilCSdPtOvSlEcmps elV0k4xhzhW9eoIkK3812MM5zu14kMupBA3XZwlXafFyxNnvLHh1UpKeluInF1WqPDw8 bT3CzaPrAhCklwaFOVMnGD8rPcqK/kp534xa5VniJ1gmSvo7hhZwW5hk8n6DJZ5Wz8Gw Dfvg== X-Gm-Message-State: ABy/qLbe2Cybt33WGKwEdhRTR/lD4PZHZ7VfovZHkq+MFuC04MXR46me 6+xH1wL7heqaqwQCOzxyZtXwZuH1MSLcuu+uaQ4= X-Received: by 2002:a05:6a00:3995:b0:67e:18c6:d2c6 with SMTP id fi21-20020a056a00399500b0067e18c6d2c6mr20307992pfb.5.1689666574197; Tue, 18 Jul 2023 00:49:34 -0700 (PDT) Received: from google.com ([2401:fa00:8f:203:49d1:35f7:f76f:e7b1]) by smtp.gmail.com with ESMTPSA id t14-20020a62ea0e000000b00680af5e4184sm932816pfh.160.2023.07.18.00.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 00:49:33 -0700 (PDT) Date: Tue, 18 Jul 2023 16:49:29 +0900 From: Sergey Senozhatsky To: Huanpeng Xin Cc: minchan@kernel.org, ngupta@vflare.org, axboe@kernel.dk, senozhatsky@chromium.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, xinhuanpeng , Christoph Hellwig Subject: Re: [PATCH] zram: set zram bio priority to REQ_PRIO. Message-ID: <20230718074929.GD955071@google.com> References: <20230718071154.21566-1-xinhuanpeng9@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230718071154.21566-1-xinhuanpeng9@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,FSL_HELO_FAKE, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Cc-ing Christoph On (23/07/18 15:11), Huanpeng Xin wrote: > > When the system memory pressure is high, set zram bio priority > to REQ_PRIO can quickly swap zarm's memory to backing device, read_from_bdev_async() does the opposite. [..] > @@ -616,7 +616,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec, > { > + bio = bio_alloc(zram->bdev, 1, parent ? parent->bi_opf : REQ_OP_READ | REQ_PRIO, > GFP_NOIO); [..] > @@ -746,7 +746,7 @@ static ssize_t writeback_store(struct device *dev, > ... > bio_init(&bio, zram->bdev, &bio_vec, 1, > - REQ_OP_WRITE | REQ_SYNC); > + REQ_OP_WRITE | REQ_SYNC | REQ_PRIO); In general, zram writeback is not for situations when the system is critically low on memory; performance there is not that important, so I'm not sure whether we want to boost requests' priorities.