From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (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 A77081A8F71 for ; Tue, 21 Jan 2025 20:02:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737489772; cv=none; b=dSdQR7amOzyclcbSyNzlI2nqsBmytqBpbnQZah65rmmyl0Y+62pSnbL8mqOAHcrvUACdhjGgAbFvwNjTotv2ZKT8/Oy+kI4LXV8tE9vhPTPfkLNBqAXXBSjJbM2DpUFc+GbWwNtlGzkFkC7mhAiCunq+z46PkgMlptiwyFbDmHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737489772; c=relaxed/simple; bh=H/Q3YUsmUpkM546v/vTp4ocpzYmmNWq60MpD+F6eEFE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=J+O2YuZt+MaV+lEtU67qKWiXW3GZJxheJgkOHW4YFfjavRFlWx8M4TcJiFLirF+mnaP/yKn5mgqZohdU4+QusdSXcqgrA3EqcuGNLnEc0TOu6/meD0DBkgNPtVEV/29cUD/aUwhKCtC+acjCkW4k1NNRZVn+jW23+k39jNmM6C0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=GHAsLbcR; arc=none smtp.client-ip=209.85.222.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="GHAsLbcR" Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-7b6ed9ed5b9so259668385a.2 for ; Tue, 21 Jan 2025 12:02:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1737489769; x=1738094569; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=y3OIVWfkgtUAiX31YkBMTeL/DLtPiayo47VWYrPFfqg=; b=GHAsLbcR/Yh/DQd1Uy18BuppRyO5tD+WJQRnnI+etUkYGCEyTGDayaV9lBTHySCaEf lR1Gj3Jhdudbos4KJIzdh4LJ/uGFzj0/6e2Y0irzlxu8DgmNvrfa3igL2lg9JgOX2kY2 ++jOwqkec28amJXToqcay1A5tj394f0cEGGEMluxgZO8D+OlryMgbWIfSlPqnpbgosxo fdS5eoFcCGNqX6waQKMYeO/C7Xu2fOCrNxVnevRpwrYot6So45iVsockdaLsYf9mQ7Ah ALER85HZSwG6xZeU4dkqAB/hWJGRDwNwey0+kIuNfmsm/sRXXmuOvg09CO0bP+xeWamn 3dDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737489769; x=1738094569; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=y3OIVWfkgtUAiX31YkBMTeL/DLtPiayo47VWYrPFfqg=; b=Ajbn9zD8CJDaBhJVqTkEZ0gVyswTb5975ZRvdo7UejY0f+DvdL11CBc5YsOMaMuVwR hGJovA6oGOw+uB4sLo6HYlLu3NoGZt07AzabpepjSHZ+4NQBBNJJhEJpTieKiHAtp29z jY5h8woRTDbEsqPli+6JmlQaKUeR4tjovuWvbEapHzhiAtb0ftfXdevgjtA9kzRFPwD3 3uE4MQkJmZWXawBypJXE8J1/Y9i1l1g6bqMtVsmqtS0WaY6lLmKDNAg05Fq1E8g39T6b XjfHjCJpruISGKRQcEnSeZt8OW2JcA1QjSbzdB8/MbfmeEme9f6yNaWWGAkQk074taBf /XWw== X-Forwarded-Encrypted: i=1; AJvYcCVjXoiJyWhIQ23hOxH+bP8/BMJJ4FCIV9AF77FTJCM672IXLnxq/lcBy2hEPXBmMa0gSUCPv5TOj8dJNUI=@vger.kernel.org X-Gm-Message-State: AOJu0YynB/e1DQf7sxVbathaELs7QnGCPIs7lr7AGIIG+jKj7BcxT2NY 6F2NCqoUxPzi6isYdmxMHna5495UqRSvG9UyRPqE6LUxQI75DoxpQLtciHRmVpY= X-Gm-Gg: ASbGncut7nxn8zLnQrsQepRaPOPDjkagWdg93xgYjB2oK4qh1ZO6dU7hjHtnl61kr6u FH9uc47isZwMJ/sqvuKQgY7PG0ce7l+zdyveRDhPfhboHs/FS+mYNnpxVWtAHJXEsR0R7KyjNbb b1/iPxKTTa1Z4ebfD2h34gYvfn0M71AUu7laaOUM3DerhU4iBt1U3YayjMMeyDMoeDr75x65KHU 0UTwQGAU5i7snEl0O1TqksY3MC19YISxNaNUtk+bxlQWz6QcKEh5X7TF8+L0QbAlRqTCXr/Bjte t7KBcK6DX6zDQhz7+52VJzJY6XirUfB5kreKUeOWDe7YpjedIzWc X-Google-Smtp-Source: AGHT+IHXwpvIHPv5sKnU+umZ7vn4igy4P4XDOftH8A6JMGTfJEfhQhF1hHFvJs4VCsRttlDk7ECwqA== X-Received: by 2002:a05:620a:2894:b0:7b6:e47a:8e14 with SMTP id af79cd13be357-7be6324fb5cmr2839107185a.35.1737489769284; Tue, 21 Jan 2025 12:02:49 -0800 (PST) Received: from gourry-fedora-PF4VCD3F (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7be61480996sm585370585a.41.2025.01.21.12.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jan 2025 12:02:48 -0800 (PST) Date: Tue, 21 Jan 2025 15:02:47 -0500 From: Gregory Price To: Honggyu Kim Cc: "Huang, Ying" , Joshua Hahn , kernel_team@skhynix.com, hyeonggon.yoo@sk.com, rafael@kernel.org, lenb@kernel.org, gregkh@linuxfoundation.org, akpm@linux-foundation.org, rakie.kim@sk.com, dan.j.williams@intel.com, Jonathan.Cameron@huawei.com, dave.jiang@intel.com, horen.chuang@linux.dev, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, kernel-team@meta.com Subject: Re: [PATCH v3] Weighted interleave auto-tuning Message-ID: References: <20250115185854.1991771-1-joshua.hahnjy@gmail.com> <87ikq8h0w4.fsf@DESKTOP-5N7EMDA> <147aba6e-7e23-4ad1-9bd2-1ceac0f3d55b@sk.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <147aba6e-7e23-4ad1-9bd2-1ceac0f3d55b@sk.com> On Tue, Jan 21, 2025 at 08:27:17PM +0900, Honggyu Kim wrote: > Hi Ying and Joshua, > > IMHO, this interface is somewhat hard to be used. Users need to know > > which value is legal. So, this will become something like, > > > > $ cat mode > > auto [manual] > > $ echo auto > mode > > $ cat mode > > [auto] manual > > This is exactly I internally proposed to Hyeonggon, but couldn't share > the idea directly here. > > That also makes sense, but I feel like somewhat vague what "auto" false > means. The "auto" might be better to be "use_hmat" instead and this > makes "use_hmat" false more meaningful. "use_hmat_weight" or > "use_hmat_info" might be another candidates. > I don't think we want to encode hmat-ism into the uapi. In fact, mempolicy doesn't even know about hmat. It just gets source information from *somewhere* and applies it accordingly. I think what you might be asking for is auto -> [true, false] if auto=true mode -> [default, read_bw, write_bw, combined_bw, read_ltc, write_ltc, combined_ltc] if auto=false mode -> [disabled] Where default mode is the kernel selection of whatever combination of read/write bw/ltc data, and user could switch the attribute. HOWEVER, such `mode` would require us to cache the attribute structure per-node, and maybe some thought on what's reasonable, so that I would prefer that to be a completely different feature / discussion. ~Gregory