Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1206162rdb; Tue, 30 Jan 2024 10:56:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IESRdApvrJUznH6kBnrcp+9fnvrIgojlsuDgAlNoJoupsXBV49rjNwdaNfohv3Qrblt8P65 X-Received: by 2002:a17:906:1113:b0:a34:d426:1bec with SMTP id h19-20020a170906111300b00a34d4261becmr146561eja.12.1706640995178; Tue, 30 Jan 2024 10:56:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706640995; cv=pass; d=google.com; s=arc-20160816; b=qBb6upoS0btjXFTijPhu4+D1A7Zc2+kP75A2296ghAkapFbTb5KWSTtsj+gOaZZsb6 twP+419ARutD4re70RH17uKvYTGLwWSk/Nbgu+dhdi23yzalUDDEHHLVpTNc++NOvq4z Y1Fj/SLksL9YuYGI6ylwjpW8EOSS06BJmhr2chWqUDo0/vapHz2Au/dN1Km0B/XcFgKS HbciH3qHlPwUF/KG96TXjzyQ9DCRnmZcVyr6gRQT/xc5w2QmTnlqwvW4EXLEywsSjRCJ K5r+k4LCkQeKe488Ug4SE/T6V7XQO1KA2UyC+ryVPVb1HPQpwKnAeuHVxFHnevJjsuCP izJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VcsdYxQa1M0QQIUwllrKVKNWcmHyrB1J+JwCbDlCV40=; fh=HuSXJoCCm5x4/Ys1VRmd4eqzDrcQ40Y0FH/gF/tn1ME=; b=xJL3wxlif8b9C8RDvAURHftw6JB4IM3+CELtojewQSNW+Uxwy8APyG+wSewtzU3uMY 0SI1tAU4s1xDKNa0pySO103AGj2T5mQo53h1DFKIKi35++GuNU6Bjbha6tiEl852zHR0 O+fxmYjIYhQ/gQgG0z3+P97q2PdExiSKj8xjBBKiMoODtQNSEa4Gbx6F9GgnJs0KVfc4 XJmUxjQ8t2SyAN5zmDk3dQ4GxDHTIlmn+I5BoTya2GdECPVrvvL3dZGZpTQbUi0N5fgU bWKraA2VgePnMca0dLyQMZikfOhcaifjZYmzTpmSzWaeQY8KEl35N2slW9o/iPDtnw9Q UwYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=AG7TSczF; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-44719-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44719-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k2-20020a1709063fc200b00a35d6682446si1941550ejj.322.2024.01.30.10.56.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 10:56:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44719-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=@infradead.org header.s=casper.20170209 header.b=AG7TSczF; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-44719-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44719-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5DE5A1F28168 for ; Tue, 30 Jan 2024 13:52:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F112B6DD02; Tue, 30 Jan 2024 13:52:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="AG7TSczF" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66CCA6D1BF; Tue, 30 Jan 2024 13:52:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706622742; cv=none; b=FDhbB+ZoapKkK0vvfPItT6XfLp3yFRJM94v1vkAXVq2kZnl3V//82+ufkczFx7yAdIy2qwMniEeoM7TN84OMDJNA10FERkxEEhQ7aeoU7Sx3hgvS84BGV+OMRqqz+OorMYBYbzEifqNs8Uv2D1/xHIJrVlkWVeuV8oCoGV0ePRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706622742; c=relaxed/simple; bh=zfYjNHFFs8Fq44BpkDOtB1YavVGP1uB9Xs7BaGdmCgI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r2PqvE1xF+AytukmSqyK/v0f9D+pp2bTyZBhju6nmjkT5zT503mrqnQkNVvq/yDrgwkYU645OoHMad86x4nQZ9pKT7IqK0K/WlhbGEMrLm3pecgd6y40a/3WYrFeDkG2L6qPqH/E7fuNwgGRo6YSDApezpjXZyeh0vpPSBhu31g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=AG7TSczF; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VcsdYxQa1M0QQIUwllrKVKNWcmHyrB1J+JwCbDlCV40=; b=AG7TSczFM7Flw+NtBumfg5BUka ZUatoQRvBWWAyH45sEq0HKWlZ6niH3NFbBbFd7VGV2BdNDU2RW5wXX3zBZ+hdsBcGIxxDmblE9ghZ ketpIOdA0YYuBqbjAp+9/LNYWn2kudrv9Hfks5HC77KY/tZys2wySTSqpMUi8/6qRHR6lSJCAdW7X vbIb+EqSe5Jo0jDK/GEHy6S74MOk3YoFKe0MnHi7gI3cAK8AYZ9JooemFQ9whngM0G0Zq7CvHs5oM /CaeuVCWywwoTjaol3QSBe4d92e1YJDw7qAbiu+xBdJ73FCWrRo7vWbAbJpgNCDZo5wgkdTCt1NkI cRafvltA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUoWx-00000009yDX-3SU4; Tue, 30 Jan 2024 13:52:03 +0000 Date: Tue, 30 Jan 2024 13:52:03 +0000 From: Matthew Wilcox To: "zhaoyang.huang" Cc: 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, Zhaoyang Huang , steve.kang@unisoc.com Subject: Re: [PATCHv5 1/1] block: introduce content activity based ioprio Message-ID: References: <20240130084207.3760518-1-zhaoyang.huang@unisoc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240130084207.3760518-1-zhaoyang.huang@unisoc.com> On Tue, Jan 30, 2024 at 04:42:07PM +0800, zhaoyang.huang wrote: > +static __maybe_unused > +bool act_bio_add_folio(struct bio *bio, struct folio *folio, size_t len, > + size_t off) No, stop this. What the filesystem needs to do is not s/bio_add_folio/act_bio_add_folio/. There needs to be an API to set the bio prio; something like: bio_set_active_prio(bio, folio); and then you can do whatever gunk is needed in bio_set_active_prio() to end up calling bio_set_prio().