Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp949979lqo; Sat, 11 May 2024 00:35:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWEpsQYXfRbc+UdpfIhEv2uYg5r9W0nKvTnQwutmsRjT+Xbvgf+WhA6sjlSkevI/848gGDcopFQIlnLixVeAzBOhX/ZYTPC1aoGnHeodw== X-Google-Smtp-Source: AGHT+IFsf5P3hJRJe1C0LjcOaZhDv5QGqrW00wphBVgx4Lz8HoLmcWxt50I47dHqdGbzcD2Ga6I0 X-Received: by 2002:a05:620a:2190:b0:792:bcc5:5c5 with SMTP id af79cd13be357-792c7577a43mr568905685a.9.1715412934395; Sat, 11 May 2024 00:35:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715412934; cv=pass; d=google.com; s=arc-20160816; b=jiJX7hPc7jdSV4/soLG9ZbKG8Ua4ps/zw8g00szopEwFfbwy8NgLvyJu2/juAy4OeU /LwyY/IkT9hyn667rUnH07jusiMPyNHqY8yMOowKaRp4xS3SsVh22iFuHlokVW783pgk t6KBQPJ0aIit7HVBYWAXnCxeSh4YW8scxYpMAOWc1vjB7HsSGsL2JW8qcxNS1t9qbzOU Nqs43s/RsToH3Gy85sms+S3legIthj6o1lQDLdN2fAC3Y/ryBos7ZsOPmO0+6IM28dYz SVR1hQezjJvizCK/HPLrrBT/B+YAk/XUDIcm0LL3I+g7TDyhcslBVU4Zd/tRO9NviDuS DcdQ== 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=onldwQIzp78LG59n3NFElPNcsr9m2UJ7FD1wkPedMlM=; fh=HXnmK5YXm8oYJOpLdgwzU1Et9Fz/JjPOgCEGvi15xpg=; b=EhrEnHHHByIiN/uQilc5pq36LyYzpCv/jJbSSjHQJAIZgthTtp5GSUEka5S/PtN7vP VIKkZB9GZlIgYsHRoKNI++Ca4FIhUcIvg9KK/CbhxM/FHy1vakDGSsoWfO/aqm6sl8Sg GyWfgosnjvZO2XxVhtzCL4/vkq7dL3sMpfZQwLnbjABfxZkqg9mOm5R0ygVHG4gmKY9S 3TthkMx6WyF68FtB2zkO5GCdPqD9+F6P+aZ1lplExtbnn0cjzwTi6mvY5/CMWr8RJ29Y pt5iagFJyL6R2WTW96/HyuhraQP/c4+i1dt52kb7VygX4qJG42dzK6oHf9PhBanKSg/e TLfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CVoAdqTG; 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-176449-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176449-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf278031si507500785a.73.2024.05.11.00.35.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 00:35:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176449-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; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CVoAdqTG; 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-176449-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176449-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 1E9E41C2173D for ; Sat, 11 May 2024 07:35:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F5C7DF51; Sat, 11 May 2024 07:35:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CVoAdqTG" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 D90D3522A; Sat, 11 May 2024 07:35:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715412924; cv=none; b=n//LUOi99TLMfQYzANLPA9EOihFAjoHVtqgIHoaxEkCwPzX5/GNYMxT/jLqpurU+7a/7JpdkiWxGIFOGdVmp6uA/yE3OPUxAJFAvvu0YLO1SukrbxPLOV6vpks9L6shK8t7kWoTgP/hhU8jBR3/phfHEXnHqnbEnRxWxiZk7NW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715412924; c=relaxed/simple; bh=RCnR/Narod92mFqDOefmW4qo56aOWbIqph2R20YVQuw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=sbnKWih/uJbfgWPVzNIadFZLcxZ3X72Pn2jl/iN7gY61eqlTi9w5mraj7UetLteMfq1a7kmZmprzMaDKItR+jDgFBGWL/fJLZuejPO0Ia1MXcjjlyaLEHfPgGqrghDfTx5ccNcS3r9uR/Fkm4HqQxMLfZAd39lKLt7QjbDDC94o= 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=CVoAdqTG; arc=none smtp.client-ip=209.85.167.43 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-f43.google.com with SMTP id 2adb3069b0e04-51f1bf83f06so3266029e87.1; Sat, 11 May 2024 00:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715412921; x=1716017721; 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=onldwQIzp78LG59n3NFElPNcsr9m2UJ7FD1wkPedMlM=; b=CVoAdqTG7Nz4W5HmK6Hov3YAsmJWnHzP9cZKnywWoDXkUlQYN5E0ZyviXAKFFYgbpn 5A9Bn9I5ZFzWzm8WCwcxFWeGsOzNC2Xw79xljYTYAHCPRRcn9XXPtHF1PcuMJr3Ob7LL LQr6oGntS7dr5Faia9Cv49ryhrMftZ7VRRK7f/K+5QRLQRIzi46H9ENcKGPXaY/K+VxI Vvacm7wo2eiPi/sL8iW5u0uozMEfkpYcesA62fgsR4+EWcExuUri3rDxxUXStBa7NkrK YJDT4Uvfqk2G8evVuWreHxe+NB32Ki+JmVhNdwo2YxljOWL7G1qMoTCusyz8HDDDVOv2 sUaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715412921; x=1716017721; 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=onldwQIzp78LG59n3NFElPNcsr9m2UJ7FD1wkPedMlM=; b=XPVQKa5f1r5/kKo9UUlW0+UKjrV9SotbyzCpDlMuzsxcJLIZnyr5ZSNvMxreVR57sG N3pESC5ZE7luja6weNIL1DVbDUoc3GKofMwUp/e2bNEw4rY6eq7r/h44Rg6sP/Op1d/x SMyc0NU+dlWGWXeUGUcqt5EOnwIxx5trrN3nwQQJVwyO4/Uz2hk7yB4Sm4+1I2Rv8Lgs NMt8DThPdCxIqCxpnswDL5mCEsuhnAx1laj2pQU0N3UmWTM0cj7qtJII7oWSWT9xK492 zGDYxmKFYQ/rReBzvaQNLOo5mGjopqyi28YRo4uSdvlSa6wUgFW0jWhrNFj0mvLcY+tW J2kA== X-Forwarded-Encrypted: i=1; AJvYcCURf+1644oYoT+1Zz8xihTN+sL1BWumctP0MdWzCjS2kRE8fb8tUoN7+6cEYEf9J0o5wgck3P45KIUFx2I0UHKg4oIvqphNxKNYFNI+vAB1l8KtSQ9yNfGzYns1Z7PPP8HWrmrfr8ZPZZ6jQKoev+KUzb42xiuHVi8rR9XSceQeLGET X-Gm-Message-State: AOJu0YzIrvd1tMaeE/2MOfst0ivHWsY0BxGGQg4Ll3NNoPie+yxwrN5/ F0fmtKRUdA5jr9jkCYqE5z2XrVSZ8aeioVT/GE7NTENdCaNAK2W6GLEeoptqO+u7AZz1hLDZmey lQI6de4LlYivXzZML6+mSzuyiOfA9lVIv X-Received: by 2002:a05:6512:38d1:b0:51f:1853:25f with SMTP id 2adb3069b0e04-5220fc79467mr2836408e87.19.1715412920609; Sat, 11 May 2024 00:35:20 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240509023937.1090421-1-zhaoyang.huang@unisoc.com> <20240509023937.1090421-3-zhaoyang.huang@unisoc.com> In-Reply-To: From: Zhaoyang Huang Date: Sat, 11 May 2024 15:35:09 +0800 Message-ID: Subject: Re: [RFC PATCH 2/2] mm: introduce budgt control in readahead To: Matthew Wilcox Cc: "zhaoyang.huang" , Andrew Morton , Jens Axboe , Tejun Heo , Josef Bacik , Baolin Wang , linux-mm@kvack.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, steve.kang@unisoc.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, May 10, 2024 at 11:18=E2=80=AFAM Matthew Wilcox wrote: > > On Fri, May 10, 2024 at 10:43:20AM +0800, Zhaoyang Huang wrote: > > Thanks for the prompt. I did some basic research on soft RAID and > > wonder if applying the bps limit on /dev/md0 like below could make > > this work. > > No. Look at btrfs' raid support, for example. it doesn't use md0. If I understand the below command correctly, btrfs uses one of the volumes within RAID as the mount block device, not /dev/md0. However, I think this is a problem of blkio.throttle rather than this commit which means this readahead budget control will work accordingly as long as blkio.throttle's parameter is configured correctly(eg. 50/50 on sdb and sdc) mkfs.btrfs -m raid0 -d raid0 /dev/sdb /dev/sdc mount -t btrfs /dev/sdb /mnt/btr > > > I didn't find information about 'RAID internally'. Could we set the > > limit on the root device(the one used for mount) to manage the whole > > partition without caring about where the bio finally goes? Or ask the > > user to decide if to use by making sure the device they apply will not > > do RAID? > > No.