Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1594417rdb; Wed, 24 Jan 2024 23:31:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0e8Qr5rDwuqeO2pNjznt7+465ftw5enNR+OkAAHjau6HmRJ8dnhULo7ZXCcFEZS88uPhh X-Received: by 2002:a17:90b:1906:b0:28d:2410:9501 with SMTP id mp6-20020a17090b190600b0028d24109501mr321132pjb.95.1706167916673; Wed, 24 Jan 2024 23:31:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706167916; cv=pass; d=google.com; s=arc-20160816; b=dRy/jApYCL98jjOeCAPoVOlz6q1sdt1iN7CBycoisWvek1qQXQ6f4RwYDKhrEX8X6i 3j1keGfAvTkjFKt9vPbsGwxZg5nsy+XddmsY1lK6ohFzYtsxysUhTguCiL0fdNt/s6Nr wD+QjfrhzojIGpVNNbkaXAKnB+A+GK36VZ0z/SFFVTgzzblbg9zJ9M4rOpCgBDeX49JS uRS2PERkK058lzu/ziBo4AGRNHxviQJSEKP5gPWD3Y0vcboSTYtUWVr/+hzEcFzVi5r2 ELSx7MaDXMCGl9d9PNZTzBeu9WotH/Ps86EaBhBkGxytQ5adWPcrZW3NC7frZLLF3K/i x0Sw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=5SpBWJtN6OzM/roaWnbD+Q5Csju0Dqh0SUBOg2+T/As=; fh=6abtdMCOnb31PFVp/BwaeJVuC4HjsgrfQrli2wBxNPY=; b=k6JJKQE1H1tZH6dq9Bv00B53exjVgqHnaZe2wtGFjp0BUJvNkgtmRTlKokT2kkToWL ZAXZsK2QpAinSxgAZpr/IBRTIsiYz3ib6gePMdSDZ47+Kao+4wRaZeePj73exZJFd1FD 6c3pEXYCH745O3wA+NmWH32J2bmb0ArRLTUNI+5WXBjFJiT7PsisHfiQ52r58Ct/hHn0 /QFeMPHqThjiHY2w3Vv0byy2avdwFuABVnEJbfdSMLXFT4iOlSsMS+ItPG+OthyJQWyB NgyPV0D/N5CqKv47cOXY5DJ3oyH/nROd/ByW4sbW0HYCfT2W5+D2g+7ka0g515EFmYiZ V2pQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ScFGMYM1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-38070-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38070-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c9-20020a17090a8d0900b00290098119dbsi886607pjo.162.2024.01.24.23.31.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 23:31:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38070-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ScFGMYM1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-38070-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38070-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 385DAB20DDF for ; Thu, 25 Jan 2024 07:29:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BB7511CB7; Thu, 25 Jan 2024 07:29:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ScFGMYM1" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1BB611712; Thu, 25 Jan 2024 07:29:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706167762; cv=none; b=MUNpZiKy3nQp9hA1MxCJ8snbjxI0ZbNnmX+MQsSA3tcX9oho9Rz1Ibad1A7dc8GpgT4dRlOlrgfUdMyk/bFXcc85srCRxMmAuztOpoLnChAe79T6/NV4Y8p/E8mkvd3uB6Mpi3Pua4za9h/Q0YUifqnwS1mWh86MG6SgRrUc6i0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706167762; c=relaxed/simple; bh=w/xsvgCqgl8ZlV62QDdJt67bBzlXk6B6Nkily4sOnp8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=B/MhniXIrqDjPXyysrVtyuIOhgcK6UAnLQqa4WOLU2hKrc7pzxcRhApxfR/jXZ0mZlwnzzVtdUD9Veo/ylFQqWpGbTVyTAsq7bQjpIqBPmmy7Af9zUvx/M84EeYQQw0jG+EOEVjr0Yq+psxDcBbHPs4gPZB7GZFOwg90AcpJ/mY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ScFGMYM1; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-50eabfac2b7so8165814e87.0; Wed, 24 Jan 2024 23:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706167759; x=1706772559; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5SpBWJtN6OzM/roaWnbD+Q5Csju0Dqh0SUBOg2+T/As=; b=ScFGMYM1J4OEBiRsDl6g9CwCaVjntROfyPO+TCDK2khMOnTrQGxSpKfmTPiXbq6diz t4yIxyBtuDe4/8ECUQvG1nxeXnqjJsIx+6UsL5m6CXOuSC9XQvNw+DGc9SRa9xbHFc2e CQrM/862odjC+tZD599RRH6lVJmdHXzvxjBpfNa/DkY6HqxT4PMprwbeGFfncNGQjhmz DdSo1sSXeKd4uqXirCaQ/SbxX8AiSS8kD8Nyf1p5LaW6K8g4dKpxL6Dkhxr92S0q8NHC A85MWYYb5QsLP8abAyhdu1hz0A6iyQmFcixJ6ZoglUkCX/A1rG+KVkvf+JFQEOQgd6kW NfRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706167759; x=1706772559; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5SpBWJtN6OzM/roaWnbD+Q5Csju0Dqh0SUBOg2+T/As=; b=K8/iIM3KjWbKbNHwy/XwnayHSAb9Nkqu6DJCwu6Rsr7rhXVF4OIFgNGhm3E7R52JsY Y7oGRpqHQmJ14Ui2n+qarXEL3H6XcA/87SRyWWLsAxMij0QNM4OvJbP2wcPF7kL1Z9UJ R0DLKEq31ia30cCfCA8Os8MuCrZfVCa/RjgkaVFSunLJm7RKw/og1q/WgBgDjw9SORfZ srMLoeOEhE5bfQPJ7eU7yhlQCDCNPWqALPZrwioHExskGTTQMaoWWLJxpoKJmKEdZ6TI RkM6Zl7UBCQ1fgW+z8uuwpjx0bJO4ghzDORfXcSx8uXV7TFYKw2wMe18Q7HhqlFzWn4g pUow== X-Gm-Message-State: AOJu0Yygu3A58pWdxbOcRVJ3rJ0nLYozqD0EZ/LxWWQsJ5x7MB7mKdd7 1X6tUsX4nnWMVUvoAVev+TP0r/tKd8zxcJ6Hr8vrjkhxPSXJeOlAMm/iClgLqfTo48ObaIIe0hK w+ybfpN2yTvdUGVfsanraFetFQyc= X-Received: by 2002:ac2:4d1a:0:b0:50e:815f:50d1 with SMTP id r26-20020ac24d1a000000b0050e815f50d1mr223636lfi.105.1706167758549; Wed, 24 Jan 2024 23:29:18 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240124085334.3060748-1-zhaoyang.huang@unisoc.com> <1879ce4b-d8c0-40f4-98ef-88dea0721974@kernel.dk> In-Reply-To: <1879ce4b-d8c0-40f4-98ef-88dea0721974@kernel.dk> From: Zhaoyang Huang Date: Thu, 25 Jan 2024 15:29:07 +0800 Message-ID: Subject: Re: [PATCHv2 1/1] block: introduce content activity based ioprio To: Jens Axboe Cc: Christoph Hellwig , "zhaoyang.huang" , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, steve.kang@unisoc.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 24, 2024 at 11:38=E2=80=AFPM Jens Axboe wrote= : > > On 1/24/24 4:58 AM, Zhaoyang Huang wrote: > > On Wed, Jan 24, 2024 at 5:38?PM Christoph Hellwig w= rote: > >> > >> The I/O priority can be explicitly set by the submitter, task and > >> blkcg arre jut fallbacks. > > Yes. I would like to suggest if it is possible to have this commit > > work as a hint for promoting the priority since it has been proved in > > the verification? > > We don't add patches that are wrong just because they provide a > performance benefit for some cases. Down that path lies tech debt to be > cleaned up later. Rather, the feature should be done right from the > start. > > >> And as said multiple times now bio_add_page must just treat the page > >> as a physical address container. It must never look at MM-internal > >> flags. > > The alternative way is to iterate the request;s pages in the scheduler > > which has been refused by Jens in the previous version. Anyway, we can > > find a solution on this. > > That approach, or the current one, both have the same layering violation > that Christoph keeps telling you is wrong - you are looking at the page > itself in the IO path. What has been suggested is that the _issuer_ of > the IO, the one that actually deals with pages, is the one that should > be submitting IO at the right priority to begin with. > > Your approach tries to hack around the fact that this isn't done, and > hence is introducing a layering violation where the block layer now > needs to look at the page and adjust the priority. If the IO was > submitted with the right priority to begin with, you would not have this > issue at all. I have issued out v3 which provide new APIs to have submitter set bio's ioprio out of bio_add_page > > -- > Jens Axboe >