From patchwork Wed Feb 21 07:53:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "zhaoyang.huang" X-Patchwork-Id: 20714 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp892035dyc; Tue, 20 Feb 2024 23:56:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUYzrqS4N2qHUiDNAqAEvZVMehv7tJdVxSy7Vo1BasLoShkzKgIYxUaUBzgqzz5fttk0eNBkkWyDFy3CdsRmH0DpQWVCw== X-Google-Smtp-Source: AGHT+IGeNovp9U6uFgOw71BXmxDCR3vCUTRFDpWsqOYO2xVh6ZwraKRzgNWiLi3ONv2k3ryjXM4b X-Received: by 2002:a17:902:e74a:b0:1db:c536:803c with SMTP id p10-20020a170902e74a00b001dbc536803cmr13661084plf.33.1708502178618; Tue, 20 Feb 2024 23:56:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708502178; cv=pass; d=google.com; s=arc-20160816; b=G2xPB9FYNibJmeRiM3k8pGTrDQ4ripOKtbfLDEmF0sQUmGbksnn0imXb+X0MknI4je amHK1eSWHiY2bly1lik2ilIdRCSd0XThC72hFhi41s7GTLGspTBn0WUDwpNJKZAXzf0Z ZkHqb4WoW1+njHqjjWRpbqikEw8EAYFqpU7yQG+4I0HzCfJ9gdSq7fm4CtVuX8xVZfrv Oor0gh0Q+tfuKk0Ga1jmGE31sp1YTpUPw2nZHCRTqI6CNTub8Soh6MlwUuRDc78jCqHp 0/d1KZ4KYQrAPc4SFr9ENaZ3MCozdkQTyiWaBYiiDSXCZHoalBjIaaTFeM90nQZ7uw2U 6PwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from; bh=YWD306/ikmEFg5l4O8ZmhhQk6BH8svQxqWZVUkgXqKI=; fh=QboBnjVs+4/WgjlPjMqwgk5tJvKd7L37xZeFzLcDUhk=; b=C8pfQ4Al/Kf5/b19JmLWTI/sDY3/gOH7nx6aWNOMaTooSGtMaXTUdS3A37X/jmVaF5 1sh7e/GGc3WmZpauAu8wWbG+5ewPm1mbU6wzcCZhtN2I1Ch6AeYy4yxsu2ga91guBOt2 Oa/Kh9q4HUPxcVB1uPN6hf2PA4GaTnDRFhZF4QvxEUKfJZzbxHaQkA89eIrg1dCxXCXy 6O9KO8daS7EasVVTwsIr3DUKiFhblDobQ771GZ3ZqZJZ+eMN/waAbKL6X+JAc+qOrkIX HzFaJ4yQ8Tn2Bt7eligqCjkd8/XqaQV/pAB307Qq8RvlNtV4pFhRdcRfVimEM3M7vlyT uxOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=unisoc.com); spf=pass (google.com: domain of linux-kernel+bounces-74267-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74267-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n18-20020a170902d2d200b001db3f0cf2f4si7631757plc.555.2024.02.20.23.56.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 23:56:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74267-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=unisoc.com); spf=pass (google.com: domain of linux-kernel+bounces-74267-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74267-ouuuleilei=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 12F75286A02 for ; Wed, 21 Feb 2024 07:56:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0ED403C496; Wed, 21 Feb 2024 07:55:42 +0000 (UTC) Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) (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 1B14E3B198; Wed, 21 Feb 2024 07:55:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=222.66.158.135 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708502140; cv=none; b=l8tOJ/ifRf4NmacQAcPDdcRD3CTBgG24R1jLv1jnENRAgx7nMFE/wB6lNJUbO7g+EDx3L6bo+GO8iAAPKnofE7cXErXOz4esMPIWULjigDDwa6quEueyqb3SgCt/C1Q1G/yup2u47amXBNu0gthlHS7LQlUl0vbY2jiakFUKLkw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708502140; c=relaxed/simple; bh=ZpkTh5RzdIMSX32mbztekXwH7Tdmb6Jgk4BnMOCtVos=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=RYuZ748BkpsYQnLL+HBitgyimNy52SOMHaMQElXj8ZwOStwUoTSMk1MUDBW5ar1cHQKug+ziRjSJOQ9SDKxrYN2AoCLIKpZ/PXHpVaqbCRis+kBjaSynqHPN9Y09fXW8ekVHgxmjuYXmWqY48CQ6Qxx8X3isGifh/V/9VAmtM00= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com; spf=pass smtp.mailfrom=unisoc.com; arc=none smtp.client-ip=222.66.158.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 41L7riDs061389; Wed, 21 Feb 2024 15:53:44 +0800 (+08) (envelope-from zhaoyang.huang@unisoc.com) Received: from SHDLP.spreadtrum.com (bjmbx01.spreadtrum.com [10.0.64.7]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4TfpRT1Q4Dz2KH9yT; Wed, 21 Feb 2024 15:53:09 +0800 (CST) Received: from bj03382pcu01.spreadtrum.com (10.0.73.40) by BJMBX01.spreadtrum.com (10.0.64.7) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 21 Feb 2024 15:53:42 +0800 From: "zhaoyang.huang" To: Jens Axboe , "Darrick J . Wong" , Alexander Viro , Christian Brauner , , , , Zhaoyang Huang , Subject: [PATCH 0/2] *** introduce content activity based ioprio *** Date: Wed, 21 Feb 2024 15:53:36 +0800 Message-ID: <20240221075338.598280-1-zhaoyang.huang@unisoc.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 41L7riDs061389 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791494380488522646 X-GMAIL-MSGID: 1791494380488522646 From: Zhaoyang Huang Currently, request's ioprio are set via task's schedule priority(when no blkcg configured), which has high priority tasks possess the privilege on both of CPU and IO scheduling. Furthermore, most of the write requestes are launched asynchronosly from kworker which can't know the submitter's priorities. This commit works as a hint of original policy by promoting the request ioprio based on the page/folio's activity. The original idea comes from LRU_GEN which provides more precised folio activity than before. This commit try to adjust the request's ioprio when certain part of its folios are hot, which indicate that this request carry important contents and need be scheduled ealier. Zhaoyang Huang (2): block: introduce content activity based ioprio fs: introduce content activity based ioprio block/Kconfig | 15 +++++++++++++++ block/bio.c | 34 ++++++++++++++++++++++++++++++++++ fs/iomap/buffered-io.c | 3 +++ fs/mpage.c | 2 ++ include/linux/bio.h | 1 + 5 files changed, 55 insertions(+)