From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 9418CC4332F for ; Sat, 19 Nov 2022 00:07:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC9E96B0073; Fri, 18 Nov 2022 19:07:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E79898E0001; Fri, 18 Nov 2022 19:07:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1A176B0075; Fri, 18 Nov 2022 19:07:26 -0500 (EST) 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 BC7B46B0073 for ; Fri, 18 Nov 2022 19:07:26 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 900EE1C5C2F for ; Sat, 19 Nov 2022 00:07:26 +0000 (UTC) X-FDA: 80148252492.14.0A7ABCC Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by imf28.hostedemail.com (Postfix) with ESMTP id 11624C0006 for ; Sat, 19 Nov 2022 00:07:25 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id 5D8E92B07348; Fri, 18 Nov 2022 19:07:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 18 Nov 2022 19:07:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devkernel.io; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1668816443; x=1668820043; bh=4cZ1Nb/ivj aUoH2+jYpa5xwRJeNDndgyHTfoDsz2wUM=; b=MxLiGOSTpQFyp7lZLrLW+szUU9 VXlR5W5ti+KsPkzP1Bsg4AqJ8VMBZJFw8NNSLWkRY5Mj+k97ZrjdJuBJDkPrSlvV Ro4ZeV8zouPEHczixWM61E5lBS7Egd88ZlZ7MehfM5xZRKfRVj0MQwF1In4ZoIcE tU5E2ChNE2VzO2Hbba8pNF2aJXhWBq/3ZmAAeRQuxTnUJwEB5+NXg8x4u+tJsEmH 77QwTYZXg8qh4eM07NsPMUF4yOhrS7nhLnvB0qWOSvOrkHIoL3uzDy32LruWylvP 9uZZTLqGPhrDGnAcHeFXnJjke8siqvXMlExabcQurvsPU/8RLMktPgebG/IQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1668816443; x=1668820043; bh=4cZ1Nb/ivjaUoH2+jYpa5xwRJeND ndgyHTfoDsz2wUM=; b=NUv4NovnoN9/ddfkMGDt7t/vYd7m1TAl10lTx5r80HBu +v6ZqKwLwfF/FJru6V43fyulDDPQBvdfFDneWl4B6x2xkekm/1xmTBOxUOD1G74J rN9AXzK/EXCi7wo5S+ted7yn3aXmamymDKVO2gF5Qql1wqn45pklfuiUqtRQ2sOV 7oqniapmmZHz1WATYM5E1my1rGXw41dAoxVF/yVF/X0a/JGcyR1WByYnVukPqoa2 g79MefF5U9rSiOdz18ICUWkdwblHbpnxlznl3VZmhVJsp6Tdik33SjBvcwI0ts2g bIf1tuzXf4xXBwVEgjq67Z1rIQoN/1+j7Kvgit5uFA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrhedugddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvvefuffgjkfggtgesthdtre dttdertdenucfhrhhomhepufhtvghfrghnucftohgvshgthhcuoehshhhrseguvghvkhgv rhhnvghlrdhioheqnecuggftrfgrthhtvghrnhepveelgffghfehudeitdehjeevhedthf etvdfhledutedvgeeikeeggefgudeguedtnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepshhhrhesuggvvhhkvghrnhgvlhdrihho X-ME-Proxy: Feedback-ID: i84614614:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Nov 2022 19:07:22 -0500 (EST) References: <20221024190603.3987969-1-shr@devkernel.io> <20221024190603.3987969-5-shr@devkernel.io> <20221116132900.ab7554e7e8342c4d30739bb1@linux-foundation.org> User-agent: mu4e 1.6.11; emacs 28.2.50 From: Stefan Roesch To: Andrew Morton Cc: kernel-team@fb.com, linux-block@vger.kernel.org, linux-mm@kvack.org, axboe@kernel.dk, clm@meta.com, willy@infradead.org, hch@infradead.org Subject: Re: [RFC PATCH v3 04/14] mm: use part per 1000 for bdi ratios. Date: Fri, 18 Nov 2022 16:03:23 -0800 In-reply-to: <20221116132900.ab7554e7e8342c4d30739bb1@linux-foundation.org> Message-ID: MIME-Version: 1.0 Content-Type: text/plain ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668816446; a=rsa-sha256; cv=none; b=6LzeYa1emW3QW9FLVCoKAQDCjFdxlwU+vc7geHLu0P45S+lw8hJ+t+Od4GQ90lr0k9Wju0 X+81RaLTDl7dJ2hR3fNeoMUV+aH5RghUZhhXKQUOO2ZFAD7ErEdSXICKM7tvriamM1wxma 0HS+4uzp1pGKO5F4rQhlsPDTaQU6lTA= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=devkernel.io header.s=fm2 header.b=MxLiGOST; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=NUv4Novn; dmarc=none; spf=pass (imf28.hostedemail.com: domain of shr@devkernel.io designates 64.147.123.27 as permitted sender) smtp.mailfrom=shr@devkernel.io ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668816446; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4cZ1Nb/ivjaUoH2+jYpa5xwRJeNDndgyHTfoDsz2wUM=; b=a6or/wdD7wNcIEN4KLsaetf1D+fO9pIr9M5INrwqeT/jcSYmhc/JxxDhUk8aZYIenjg6n6 blS+VY0HZKWtOtruswZ40Cz+mp9TMXr2oW9uzrA8AcfujrpnIbv2H55Ob904f0JtQEU5a6 GUalzjbH8EfMIgmqtUAW0n9ZwzgW9Z0= Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=devkernel.io header.s=fm2 header.b=MxLiGOST; dkim=pass header.d=messagingengine.com header.s=fm1 header.b=NUv4Novn; dmarc=none; spf=pass (imf28.hostedemail.com: domain of shr@devkernel.io designates 64.147.123.27 as permitted sender) smtp.mailfrom=shr@devkernel.io X-Rspam-User: X-Stat-Signature: n8bucds7cdukd74rqxrwtk5c9wbpqfjm X-Rspamd-Queue-Id: 11624C0006 X-Rspamd-Server: rspam11 X-HE-Tag: 1668816445-644454 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: Andrew Morton writes: > On Mon, 24 Oct 2022 12:05:53 -0700 Stefan Roesch wrote: > >> To get finer granularity for ratio calculations use part per 1000 >> instead of percentiles. This is especially important if we want to >> automatically convert byte values to ratios. Otherwise the values that >> are actually used can be quite different. This is also important for >> machines with more main memory (1% of 256GB is already 2.5GB). >> >> ... >> > > This changes an existing userspace interface, doesn't it? > /sys/class/bdi//min_ratio. Can't do that! > It does not change the user interface. It maintains the percent values in the min_ratio and max_ratio knobs. For instance: -BDI_SHOW(min_ratio, bdi->min_ratio) +BDI_SHOW(min_ratio, bdi->min_ratio / BDI_RATIO_SCALE) > We could add a new interace to the same thing, I guess. > /sys/class/bdi//min_ratio_fine or whatever. > > We might want to go for more than 100->1000, too. Otherwise in a few > years we'll be adding /sys/class/bdi//min_ratio_even_finer. > The next version of the patch series will also add min_ratio_fine and max_ratio_fine. This makes sure that also ratio values can be specified with a finer granularity. > Also, this patch forgot to update > Documentation/ABI/testing/sysfs-class-bdi. The exisiting user behavior is not changed, only the internal calculation.