Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2212070rdb; Tue, 20 Feb 2024 23:56:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUrjY6zDu7NBju+DU6FInTLTmc6nhk0FJnMShb5SpUJjEjSi0FUL+5eR1WfuB9YonVC5x6kBfOsGQkin7ae0kELnzz7nlBByjP9qd7cwA== X-Google-Smtp-Source: AGHT+IF8+LnH3A7KIdyFO28Mw2swkKM4m//dpe3cUX/kdlfjUrmPmiP/E3/8dZq8p1IRtXf24aNs X-Received: by 2002:a05:622a:1445:b0:42c:65cb:7bb4 with SMTP id v5-20020a05622a144500b0042c65cb7bb4mr22714531qtx.29.1708502168413; Tue, 20 Feb 2024 23:56:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708502168; cv=pass; d=google.com; s=arc-20160816; b=LqqHjnClGl8ekCJZzj7VRS9eWK00yr7qxvMLAnVWkoiBkxCbpGP2lCo5vsPx28Ajc6 iTpL5HDRZYsQ0LksXAQslW+GtZexXt64vvPc+vWr6//8GOd+YuHJZuBL1JryVUAtq4zb iqtn/6eAigqXVt2y+JyeoiIn8SRk+FJACxjUw9UCWQ4jmLpNksgKLseImuuBgG//9yy0 rfR7bY0/Q60C0E5vr3+2T4YmCMwe0POFANnrJdC2aKINriD3QYr06hdNbhtQVnsNyk7y 0M68WrsYa4LndVmsSq3H0Dcu2GtCA8MRQPmd1da8PU0cU98ozz1CWPEFdrDyRPxWN7VA PHAw== 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-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74267-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o16-20020ac841d0000000b0042dff81e402si8051486qtm.471.2024.02.20.23.56.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 23:56:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-74267-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=unisoc.com); spf=pass (google.com: domain of linux-kernel+bounces-74267-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-74267-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D37FD1C24CAF for ; Wed, 21 Feb 2024 07:55:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 020863BB4C; Wed, 21 Feb 2024 07:55:41 +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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL:SHSQR01.spreadtrum.com 41L7riDs061389 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(+) -- 2.25.1