Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1196366rdb; Wed, 24 Jan 2024 07:39:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTTKTDksvCEoOulYg8y2zZbFjvN/NcrRRYn9k03yuhx5QuY6Lwq+L7QL5DiVQ2+WEVZFzm X-Received: by 2002:a17:90a:8a0a:b0:28d:2c3:6d38 with SMTP id w10-20020a17090a8a0a00b0028d02c36d38mr4128417pjn.77.1706110781035; Wed, 24 Jan 2024 07:39:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706110781; cv=pass; d=google.com; s=arc-20160816; b=XFjH/yIM5VDYXuYPPniiabc24x02ChCGLIhgJ3pMHgxcYhs6bSpQmrIYtBf49t2Dz9 ASoEgD2jikU69mWi6g1h9h7BylN0YyULIFIbt7u8IPhncSXD9CB++MiRoYD19q4szPU+ cGWqEt/KlvrNuFObUrznlE3XsAE7LHdDMk1VoGHIkhKIBxQCguwDn/9wOMlcP32ed0Ar uOR6kMSmNK+RagmQ3stylUmPYOAOKt02H3LNt1w7uitj+2dgxGEX2htjZPxSI+pW0cOt ziWOzAQGyqxi8zDUYYKKCTFJE47ZoD9ZrWBMv6xrWzufGb4rrAvvcsA3Bj+JYr75JBBC gUyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=imWP3Gp2E6UBnAoIrtpIX4YQW5R0bzLUVdUmcPrzDb0=; fh=2rA4TogBVr6Idf+9kOIpUY3Y/NMb9Xooc9TU80VQO74=; b=M1D4LSq+ivi2ADOo4y1voxxLYBcrByR+e+M79e0jWOwO4f5ywiQ8LorAWBY8+KhpnW gmtwxLG597/+sQ/dXgTauhN0QBiGW/pnsjHBlaYuIViIaOVoKdzENbyvTEGHkQwtd2Bi 7at2nMcRFeRwNhA8aBzJvWzqemeyZcO5EvEtHTbjsZsirjPF+HVxK1eZR+19ICz8IZxX WH9UmdV2OGmR6+xO6pp4iPvValYtlxqj42QojfoaL0vVeukZpoipjFCAxpMjQv0kuz7S lPwZxiyEOfwlIk/v6RmQkKq70I+t2EiVL1mg8737r2zM12idY+Esrq0Pp5L2jEQQ/Cgh hmVw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=q7iaqQj+; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-37268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37268-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fh10-20020a17090b034a00b0028e71634cbcsi11998272pjb.141.2024.01.24.07.39.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 07:39:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=q7iaqQj+; arc=pass (i=1 spf=pass spfdomain=kernel.dk dkim=pass dkdomain=kernel-dk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-37268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37268-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 50F1D28737C for ; Wed, 24 Jan 2024 15:38:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB5287A73C; Wed, 24 Jan 2024 15:38:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="q7iaqQj+" Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) (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 9E7427A73A for ; Wed, 24 Jan 2024 15:38:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110729; cv=none; b=o8QiWO7wAPwi7dBH39J4JNBy8W6DCnyphFaOUFOEwv49mHi/yaskLuNTTl0hereSQYObN7XvMPGOYx2EXPjGSWunVluaIC5azkJoN2BovCUYtX42gZfIOIHLSOCq9gE0LwzPwF/nXR9MeV6dKBlShfe2Zj6TjVi0CozZYu/K8Oo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110729; c=relaxed/simple; bh=iChkz3RJ/JjX2cGQYmXcqtVpR1TMEMwpKCBiO64owQY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=D72L59jiSNsL/TU+GkvomrB2Sr2PX18PkPjkxen5lgt3oQMmR/czQYIxRO+frC8A0ev9rgiK5ca9uHYxCUvIP2uZq9ssC/QgZWne+eagXe3kg+6vl+hlTjxNZqlwfcLu7R/SAdeCmw97Jney6MpGGU4Bj8uu9qKDj48TuVpCelo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=q7iaqQj+; arc=none smtp.client-ip=209.85.166.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Received: by mail-il1-f169.google.com with SMTP id e9e14a558f8ab-35d374bebe3so546115ab.1 for ; Wed, 24 Jan 2024 07:38:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1706110726; x=1706715526; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=imWP3Gp2E6UBnAoIrtpIX4YQW5R0bzLUVdUmcPrzDb0=; b=q7iaqQj+buECW7MJ6Du13wNdR2g3nq8qqzgX03Bx/6IuG85T8YjQZ+GxT/qvSC5O/k pnuyn4bPjiva+EzCjzk0/2R/A7GrS6LibIh7VXIMoeRihaOsdEvpSRRZnMpPcP3vZiTo yQO+tkU+062CSok/3eabjToYIEiC4nHE/leLKRCNOlUC5S9Z9oPMf3w1wKflttg1sx3l pqdoqeMqL/94E87mlD0CZQhzqcSTWfG42hy4vmF3VIMD4d25PcE72nDbnNG7oLFVeHZt f5P3nPvDisGqLOYhRyBge0olJbcpbQyJyCcUOotbuwYX4y+Z7/3SJX0+i67yxfLC3b4f +F2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706110726; x=1706715526; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=imWP3Gp2E6UBnAoIrtpIX4YQW5R0bzLUVdUmcPrzDb0=; b=c5HN/+miKO0kbmrRItWo1yxwtFl8/XYuKPt7nnPzuMHrLgXIs3AzpiYTCHDJiG3KN8 FnYOoRWfGCnvubiSdCZ79NwhUxPpePhxbFyYiGoOjHK1Q+kpzf/y7UTx605ZTEAndwIl QZUDUSpuYhnelJNRyEBLPVH5SXqjfARuhqlXWYyYCqFUA4TL3TqJEW58EvWU3dsS8sde udZ47YqmGdRbi5Vv80FJa4SWMrkY38BYetJVvT8KnxjUq1lVgFmWLYgTc8ZQJa2vEczE j37+GP6uJimnrx7Iwh4O/KUkI0rGh6A8IRJOPC/E5YXAD11FvLfz72jM5Lf5Qz64fM2T 9QNw== X-Gm-Message-State: AOJu0YxAFGxSSvtEEhENpfAQ1WAGvZHfgyteIh6MXt+R8WHskgpwlLcN BHHRlrFE+M7Xgli8Ycn3F7tpr2hPkX7XYTsoCLenpwcFlNWimjG1gAKgp1WR9fs= X-Received: by 2002:a5e:9507:0:b0:7bf:b18e:fccc with SMTP id r7-20020a5e9507000000b007bfb18efcccmr2266012ioj.1.1706110726558; Wed, 24 Jan 2024 07:38:46 -0800 (PST) Received: from [192.168.1.116] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id q26-20020a02a31a000000b0046f1d658f71sm22225jai.143.2024.01.24.07.38.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jan 2024 07:38:46 -0800 (PST) Message-ID: <1879ce4b-d8c0-40f4-98ef-88dea0721974@kernel.dk> Date: Wed, 24 Jan 2024 08:38:44 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHv2 1/1] block: introduce content activity based ioprio Content-Language: en-US To: Zhaoyang Huang , Christoph Hellwig Cc: "zhaoyang.huang" , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, steve.kang@unisoc.com References: <20240124085334.3060748-1-zhaoyang.huang@unisoc.com> From: Jens Axboe In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 1/24/24 4:58 AM, Zhaoyang Huang wrote: > On Wed, Jan 24, 2024 at 5:38?PM Christoph Hellwig wrote: >> >> 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. -- Jens Axboe