Message ID | 20240515012350.1166350-1-zhaoyang.huang@unisoc.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11840C04FFE for <linux-mm@archiver.kernel.org>; Wed, 15 May 2024 01:25:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6AD538D005A; Tue, 14 May 2024 21:25:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E3BB8D004F; Tue, 14 May 2024 21:25:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 487B28D005C; Tue, 14 May 2024 21:25:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 184A98D004F for <linux-mm@kvack.org>; Tue, 14 May 2024 21:25:11 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 78A92C1096 for <linux-mm@kvack.org>; Wed, 15 May 2024 01:25:09 +0000 (UTC) X-FDA: 82118886738.08.B4C76DB Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by imf14.hostedemail.com (Postfix) with ESMTP id D0B2710000C for <linux-mm@kvack.org>; Wed, 15 May 2024 01:25:05 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf14.hostedemail.com: domain of zhaoyang.huang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=zhaoyang.huang@unisoc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1715736307; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=o6/ssqlN6URFq1w0+qP65WaoWI4IrwumlryTsba8PEs=; b=Iowz7eGVAWnQlwTI0lMVSAGFhPlKp9PqdkzCpCjMVJoZDMfH7bcUQTRa3CQzd29aeQovaA rub/T8zcac9LoIwB4TRBXPkGzXO+ikVUMuwmAAHeAV+VvkMXjE8as9zmmy9IAt2/Vj9QsS rTjymfHGtzXCDmEP5OMz6Mp+ooNURFk= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf14.hostedemail.com: domain of zhaoyang.huang@unisoc.com designates 222.66.158.135 as permitted sender) smtp.mailfrom=zhaoyang.huang@unisoc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1715736307; a=rsa-sha256; cv=none; b=gIXykYihGhNecIZQj2W+hP467hOY/jMt0xK7S6eAGlPShUxN8Ll25yxRWA7doRyWMGp3SI r6NahNFGiX/po4dXiigdpIn70UMNF85nABV5fGTbme2s/OGMjP7Yl+1DHoBBXa9+0tGv4O ZTjGCyTt7NUGg91OPyLdx6S3PFiXuCY= Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 44F1O3vE051219; Wed, 15 May 2024 09:24:03 +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 4VfFlw2713z2QDRDl; Wed, 15 May 2024 09:20:44 +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, 15 May 2024 09:24:00 +0800 From: "zhaoyang.huang" <zhaoyang.huang@unisoc.com> To: Andrew Morton <akpm@linux-foundation.org>, Matthew Wilcox <willy@infradead.org>, Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>, Josef Bacik <josef@toxicpanda.com>, Baolin Wang <baolin.wang@linux.alibaba.com>, <linux-mm@kvack.org>, <linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <cgroups@vger.kernel.org>, Zhaoyang Huang <huangzhaoyang@gmail.com>, <steve.kang@unisoc.com> Subject: [RFC PATCH 0/2] introduce precised blk-throttle control Date: Wed, 15 May 2024 09:23:48 +0800 Message-ID: <20240515012350.1166350-1-zhaoyang.huang@unisoc.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.0.73.40] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To BJMBX01.spreadtrum.com (10.0.64.7) X-MAIL: SHSQR01.spreadtrum.com 44F1O3vE051219 X-Rspamd-Queue-Id: D0B2710000C X-Stat-Signature: m8eob97kqccqkhdgddwq8uqzp3izf39m X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1715736305-867084 X-HE-Meta: U2FsdGVkX1/xx2Zm/U0rjvB/vaxzovYFrbrSgMzcHFpI4w6sFRQ1+cPsyzkMylfXfmBZsc5lgYllPFPoR4Zw3xe5w6tOl/WWK6jHHAl37DpA6pYTpZNtp5f//FT5BdKVNdCAEDlwBrRDfuXUU1xuP6gO6MKc+jsMIAtLVOlpagiUS2MokOsXhT23KvUyN2vJ0/D5XN6KOoaDP8VY8QIv+R8Y3rK5oAPDX9uKMICxgiPDj7CFch3yxfajDQJaumIcLdaRJUhTd1zI4RV3dEgDu5twepw7tJdRCJBmP8DWa1GxWAYnd6QhJaDajk6Xjrq6ECabW+h9+nMZtAY2UoqibrKOfAAQdtDMnP0RRstkfB4pu05CIWbSp6xgQXhlfhu2vuazJpLAvkP7YiHOLN4KgrWTIZKhfri4ElGCiw4wobEv/xaZtCFa05PeTTSS6/dpsRrYzHnPdmivKUL+nGGgrKOQI1KjlJctxH7iLi2OjYLokYgOTJ5m/yTKcGEJ9OlHWbLB/uLrO2QWh6NGq81voS0YoIpU0y1GYkh7DOhUuStaZWuKZzxxHlFwEmzjjdRxQ5lzpHAzWPksFTd+tfmVYT5ma+diXff2Ve6M8DpDMhWmga4ZJ9tnFbRCBZyr6sIzotllzIR1TPUoPHGRspSKCTs/z6n5g/csJftwCpTo/Kk3RCq5LHe/Ii88H2B0jiHntMrrX9IY9hKoD8IcsWieJQooCn9yprQm2gWCEoNh9UhczDBAR8ejuHZoHxbpqpMGSChwhHTJnHMDkKV85T8xeY3GiyV8B+I33mndaE+W16wd/b1Npzv9T7v/cfbW3/imi8CervSgXIyCXxpOsYK4OxrLsdnxwzN8WTcRFKg+Nv0aAxp6xfnSCaKvglVA3HBFwPGcZ1TDyAWBFCZ9Z7jYYEAH9MpOCCqPVDcetru5EDK03yFk16trLIaGHN0FXZMmzuX0WV0ZSRcrQKT2LcT XdXb+Biz rDyjbhcBUC07ka5nXtUu6crq0gznz8nh/85RbO3+ufRVvpo8BZs2CVoJvD/8vE8+90OPf3Vo9w3ovk4IgcBfVQaZ9LQCSDj7rafMNPOLHTEH2OgUT8B0J4sHv46Cp7MwbLmntJRnHDZltRl/H3PQz2AH3q6+La/M/VozUiGE3vf6Hf7UFITcgAOQuAqWKZ9gg5YhD X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
introduce precised blk-throttle control
|
expand
|
From: Zhaoyang Huang <zhaoyang.huang@unisoc.com> There is always an error between blk-throttle's configuration and the real value which should be introduced by over-sized bio as there is no control on ra->size during readahead. This series patches would like to introduce the helper function to provide the bytes budgt and apply it on readahead. Please find below for the fio test result on v6.6 which presents 2%-10% improvement for BW and lat. Besides, we can also observed stable BW instantaneous and lower stdev value during the test. blkio.throttle.read_bps_device = 1MB/s before: read: IOPS=223, BW=894KiB/s (915kB/s)(175MiB/200919msec) after : read: IOPS=239, BW=960KiB/s (983kB/s)(153MiB/163105msec) before: clat (usec): min=4, max=16795k, avg=4468.74, stdev=265746.14 after : clat (usec): min=11, max=209193, avg=4105.22, stdev=27188.04 before: lat (usec): min=6, max=16795k, avg=4470.57, stdev=265746.14 after : lat (usec): min=16, max=209197, avg=4120.03, stdev=27188.04 blkio.throttle.read_bps_device = 10MB/s before: read: IOPS=2380, BW=9524KiB/s (9752kB/s)(1007MiB/108311msec) after : read: IOPS=2438, BW=9754KiB/s (9989kB/s)(1680MiB/176405msec) before: clat (usec): min=4, max=2494.6k, avg=412.72, stdev=25783.51 after : clat (usec): min=4, max=201817, avg=399.58, stdev=8268.85 before: lat (usec): min=6, max=2494.6k, avg=414.48, stdev=25783.51 after : lat (usec): min=6, max=201819, avg=402.10, stdev=8268.85 blkio.throttle.read_bps_device = 20MB/s fio ... -numjobs=8 ... before : IOPS=37.9k, BW=148MiB/s (155MB/s)(11.6GiB/80333msec) after : IOPS=39.0k, BW=153MiB/s (160MB/s)(15.6GiB/104914msec) before : clat (usec): min=4, max=1056.6k, avg=197.23, stdev=10080.69 after : clat (usec): min=4, max=193481, avg=188.83, stdev=4651.29 before : lat (usec): min=5, max=1056.6k, avg=200.48, stdev=10080.76 after : lat (usec): min=5, max=193483, avg=192.68, stdev=4651.87 blkio.throttle.read_bps_device = 30MB/s fio ... -numjobs=8 ... before : IOPS=57.2k, BW=224MiB/s (234MB/s)(15.6GiB/71561msec) after : IOPS=58.5k, BW=229MiB/s (240MB/s)(15.6GiB/69996msec) before : clat (usec): min=4, max=1105.5k, avg=126.20, stdev=6419.22 after : clat (usec): min=4, max=183956, avg=120.60, stdev=2957.28 before : lat (usec): min=5, max=1105.5k, avg=129.45, stdev=6419.29 after : lat (usec): min=5, max=183958, avg=124.40, stdev=2958.18 Zhaoyang Huang (2): block: introduce helper function to calculate bps budgt mm: introduce budgt control in readahead block/blk-throttle.c | 44 ++++++++++++++++++++++++++++++++++++++ include/linux/blk-cgroup.h | 10 +++++++++ mm/readahead.c | 33 ++++++++++++++++++++-------- 3 files changed, 78 insertions(+), 9 deletions(-)