Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp2050408rdb; Wed, 31 Jan 2024 18:40:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoicjzR7rgi9VLR7qVwpkL8po0AsaUIvbFraLFVeIc8qbxLVxb2GPjmat9wwZnAfHKqYfG X-Received: by 2002:a05:651c:793:b0:2d0:54ef:1dc6 with SMTP id g19-20020a05651c079300b002d054ef1dc6mr2026475lje.33.1706755219241; Wed, 31 Jan 2024 18:40:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706755219; cv=pass; d=google.com; s=arc-20160816; b=KtHmZ7TqrJYzFrm3tvJ6/DxPpSrSGmBb81R/jtxWcX6ggTZ9w8khtWJ5lg4TDhiTMu wClrRXC85yDmeobAaenbK6dTJGtGD1TVFszwuiYc659Lhch4sIW1QFx2uF3VYYxUWQ91 daCsPYHLCetRZCG8by3FPgXn32SOKJo+0ZQ5cyGmA4/t1gX4aX/0AvdbKkXZKr9EzLr/ iSQ3kiaN5I4ZdqNtQ3NQpliWuVsmkyYooyVSoCPf+XFpBG/4QxwOvfX+k/CMMPfrV08P Y8eAkuCrFKj2VsVH2qN1KgyyWxVxGc9ybV816X5kKpeOl1mgfGaZTDI8Q1umcbhfeyON Ff2Q== 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=IXWwSoZre+3koEZnxFdbxmNFgGH19wNuOnkGx1zO/uo=; fh=vIifAJixsM8WlwjuNOzKx1lp+eZcc9ZIFLbs0pPmO5k=; b=RYZMWeU8hdkxQ/aTphpThgniWhEv5q4bZWVrReEhn5NPYtOsAVsIXENDUOVsvO5TIU 0kNziRrc9lu7eAb9fWxUMo+2lw70elaeD9A3GlyhKEZVSAmQJKqai/E3KygWoNVQduN5 7HOmIP5tqBbv0poJfd2q9+r80ydjRKtVocCMAJNqqtVkpKoA3AbUBHdubhkk6hv22M4v gtIj0waWFfemWwNSIn2X3HB9CowwoOuGMvlBRq+ZGUA9ebjjJ4WLyYwNX6SSkjuPaUbj dVtnbXd17+5epk3JrewuUt7OWvKoekY8SBTb6n4ZJVG+3vXLyPeGDJfkbTodwxA8h23V 2HPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VaR0XplI; 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-47546-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47546-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCWoER6HEWkyhaGnu5EgOqlRSBn8SRR7dUQ/MsZudgcW/DVV1i3enQNxroJMAcxFfEZppYhZInyCj9IcM9T3lk98KqkePS+ET/BTmpGq8g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ee42-20020a056402292a00b0055729eed820si6458836edb.37.2024.01.31.18.40.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 18:40:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47546-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VaR0XplI; 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-47546-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47546-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 010841F29ED7 for ; Thu, 1 Feb 2024 02:40:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA7A53A1BD; Thu, 1 Feb 2024 02:40:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VaR0XplI" Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 4D342101D2; Thu, 1 Feb 2024 02:40:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706755207; cv=none; b=us7G+NOJrYNeZtXh6O16+rfIv5mftKrLiUkvMOx/gCEbO80mEOEjCSeXCgy0QI1Sj9wQjIrobbSDgGyk3xExaemfpNg8tfn1QM2mw5VVkv1KXqKYyUkg5/JwS5PaVXjQvKzrabSCndvSFQs7lj+cI1MChuQPWYlkZRWRw5/RgUE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706755207; c=relaxed/simple; bh=LPpZdySx2W/ZIxGVAEs34b1jtJV9q9VGPAnbd7UvT+Q=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ArKic/oKz7z7oAPmAxk77K6sdU335/zWikWkpuRbkuYFEiJX4LDBVpJJwbHS0wOWJrv7F+TTG4PEE3bG6UgknCZHAn+1UbH1OZXtUsiivwm0nPdJs57vGhe7GdbVL2jv1MyIFtT0/FVUxqwVljOLoqhMeuQE7FbhS3qbBphdlRE= 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=VaR0XplI; arc=none smtp.client-ip=209.85.167.54 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-f54.google.com with SMTP id 2adb3069b0e04-511234430a4so683559e87.3; Wed, 31 Jan 2024 18:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706755203; x=1707360003; 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=IXWwSoZre+3koEZnxFdbxmNFgGH19wNuOnkGx1zO/uo=; b=VaR0XplIH/0m+a3msiUn/1QKoOKjnoJoLNsI/tYCscCPKiiuQFzSQ6oNfLQAuu+TKf ebR99ReLfy8UtoEwAPNpqWcKTQznVeMOAuZ5ctKd7ml2JbY5UJfoIBT7kOE9fKurS1Z3 2z92KbgADy4WAUVow4KwYh30oJaAm3lYY1c2Aaijwvcrm7Nw7e0/Ngve4MbYnct0tZ3U ghv4aDP8dFMWUt4cTP5ou1RLTTqgUgKj+FDgkFYhd3WGnp+8wP/BnIAtJsXisrWMW/7I SqDJdi20LClFGhkP5X3ae+RVqNHaK7pRUBs7OigdEDhZv8SjOhDAtMB/uM3NwSvzIhCe NhXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706755203; x=1707360003; 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=IXWwSoZre+3koEZnxFdbxmNFgGH19wNuOnkGx1zO/uo=; b=Q6+nG+BwMopuraGEBQWzR/7nHLSJ9ZdbIwe3J4E4D9kRW0y2IcnkNDjE+k/DpHTltb D8jLF1jNxI4K824ebvkst+KWWziCSsn44f6PN/wgGhKzEXGsWB6tzLcOt7VWhY5Yg2j+ h8XeAtaMOF/IuoLqEmpOCuGfX8FyAvU5Lqh3Iv97Bcw0DRSw4VMARN+bnYzaRZW/0pjO pcmHy0e36zSlub3gj94N7YlKn1vpF1yvZpbBfLvAy+EBlt9+ZhMlC8AuAI/RCFZJRsMj O1Yu02I7o3hvn6+J1lV7G0udC5+i9/872sXctJtwJV/DHw5ffMF1+bE74Ruohw7AtodS +A6Q== X-Gm-Message-State: AOJu0YzZRvdV2aDW4DASJAA+hDbOMbvIJN57gug3Kdd8PR2j/5ewt0bz bhkzT85Y90rY/I/Sjx2w5BEwWa9UwI3d0L3rFZKQDF3xmD3HUSkzitMxiNsQvDMqX7ZqZCNhRWY oPebrFZ6D5z2HcLfYMtBE5yo5MDk= X-Received: by 2002:ac2:4d10:0:b0:510:e05:435a with SMTP id r16-20020ac24d10000000b005100e05435amr759072lfi.26.1706755203061; Wed, 31 Jan 2024 18:40:03 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240131105912.3849767-1-zhaoyang.huang@unisoc.com> In-Reply-To: From: Zhaoyang Huang Date: Thu, 1 Feb 2024 10:39:51 +0800 Message-ID: Subject: Re: [PATCHv6 1/1] block: introduce content activity based ioprio To: Matthew Wilcox Cc: "zhaoyang.huang" , Andrew Morton , Jens Axboe , Yu Zhao , Damien Le Moal , Niklas Cassel , "Martin K . Petersen" , Hannes Reinecke , Linus Walleij , linux-mm@kvack.org, linux-block@vger.kernel.org, linux-fsdevel@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 31, 2024 at 9:23=E2=80=AFPM Matthew Wilcox wrote: > > On Wed, Jan 31, 2024 at 06:59:12PM +0800, zhaoyang.huang wrote: > > change of v6: replace the macro of bio_add_xxx by submit_bio which > > iterating the bio_vec before launching bio to block layer > > Still wrong. I did some research on bio operations in the system and state my understanding here. I would like to have you review it and give me more details of the fault. thanks 1. REQ_OP_ZONE_xxx a. These operations are from driver/block layer/fs where we can keep driver/block layer using the legacy submit_bio by not including act_prio.h. b. most of fs's REQ_OP_ZONE_xxx will be handled by blkdev_zone_mgmt which is the same as 'a' c. __submit_zone_reset_cmd within f2fs use no page for REQ_OP_ZONE_RESET 2. other REQ_OP__READ/WRITE except REQ_OP_ZONE_xxx These operations all comes from driver and block layer as same as 1.a 3. direct_io keep fs/direct-io.c and fs/iomap/direct-io.c using legacy submit_bio 4. metadata, dentry Are these data also file pages? 5. normal REQ_OP_READ/WRITE/SYNC fs choose to use act based submit_bio by including act_ioprio.h in corresponding c file