From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 0803C2147F8 for ; Wed, 22 Jan 2025 16:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737564833; cv=none; b=KGcNQI4G3sIkoEGv26gsjdQBDm9N2aEoptVp4vsZzBnIW2lKN8jHx6+7pJWGJahoeij23kW/xr3rbrPagQ8g6xH7+tJpnxpgb0Z5S9F1Cd9DdcJJV3Ruv5k26B8zv7StSJEszEart9akJUBUyE7fRaNkO4LSb++NhGWY6qpgjYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737564833; c=relaxed/simple; bh=oq4ucEml8Du+AQoyiQsM8vVo8X8eFmZKkyZqTd20htU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GiSZYMj+rirATNQD4N9kTHmQlyshe0Wrli3KVeZtI7UcUQUpiSWuzIAjxp7OHoG3a3+Dcl2rLEdoHugQujRibkFiQ2fFb9feMaTPWIRuQUaCIAWD1aix/R+uhvLnwhHuUPudQ352Fhr7EJ/e9ifhcMnNbXuP8uq59KL8jO0wkCE= 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=IcBpHX/V; arc=none smtp.client-ip=209.85.222.169 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="IcBpHX/V" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-7b6c3629816so378768685a.1 for ; Wed, 22 Jan 2025 08:53:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1737564831; x=1738169631; 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=2sYaltL8gZYQo2Yt7u0tbi3ro18skyI7EvhRt4tvdiY=; b=IcBpHX/Vr6XNtC5YMZVfuKRCRIr+cLga3H/WlmdrGQ4Q4Ppd1iyP5PL2cgryrPCbqc g05H/2tviOmTBgUsBUQZQYCWX0acLYKBwZWlF5RKPP/2iE77ZrMjq/uCzpcb5LPg+9SG LQ9UuqjW92iojelpw2wTnCPegEzUyf9CTo9NIz7bvYC4glydYTGQCCSqUxEfJCB47p+n h7dJXBmLvlRdoMnmkQ1/6MuX8XwDoCAwtB9zNbPr3yfXK7/omgJskdllJ4+HKyVoFI2g iOtJTkEp+0yzTiC7Uac95ue0tRRqBnpAO4gn3rmhRSWSdWMqaPVNRJL2P7Di1XMk1QvC Mdpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737564831; x=1738169631; 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=2sYaltL8gZYQo2Yt7u0tbi3ro18skyI7EvhRt4tvdiY=; b=axWWWC9YWugLSJ91yKo/VVLTaNs90LpzCJ+yur0YPlVebxm0iVDFWg0872nFJ294/1 HXkhFkQUzOPkQo5G8NI/v5gdHItkpC1WH+mjyWQJZ2qN7gAJq5ZDcCj8qV72H5BzBOJW RVMyKxz34q8uQNEiI9rkuLdDbtrwYd0r22BtiWDEw3Tq8bY6xJCU1bgwrZPCy9803vW2 kJBkGNwioioC+a8zqx4suvXinfsK4RcKjGJhV5ZYI/irbUPdhWUG85XHtQfYF2PdmlK/ ibpgB3K4gVLMOfpCd6GbyDCvmIqVt4KsiUt2RUDbrD6stfsvu26nmHrcCNAJ9p73z98o sDbA== X-Forwarded-Encrypted: i=1; AJvYcCWovdujP8VT0RRzzcJYlYtk7dG2zUhyBTgJaTJKFOnI5RSs7kpbKnI0gAegZEoTcupqu7EUqL/S1lKC0Kg=@vger.kernel.org X-Gm-Message-State: AOJu0Yxe95Xe7c8yYCJfgWERcIHIt/mWZeLZAR7WlmFZATs8u6jHwKwc TVLW2/KL/yKAM1rpWjgD+ozNdLG5/sPqVBTBoda0hSrasCGDRwjuun/a1DB6E5w= X-Gm-Gg: ASbGncu1U9c46TB8DeYO3DeOuZfR78Q2O5KzrZ1J7CgG27a5XejJg6mVSK7W2p3z89V OQINqFXLppAvDrbNCaMsRYfrjh5VS7L/rX61eszD7Myt0oqqvBTxlxanKEaGEjHu6chBhZJlMgL hLErbZzp8prOTMpSfJfgYW7zdLgH9HlL8W07lhySRTOJjst3Hwgiwx10YNPPaT2Wgw9ppyiHASe wPkl1rwvr4lbeQQvNkrwDLmtElRwv2NZf83TTHrXiklP8MM4bumUDb4FkRLRstv3HfVwoqCYucW 93BhX/XN8fyYwCY2dxQhYBfMnHHnZi7NWyHSJw/GCF1bdurSXW6+ X-Google-Smtp-Source: AGHT+IGcrio+LQ+dKFTcjBpIjnWC+goe+/GikhWUO65GzbwEN4Ark8XD1eRKwktGnHdP8xLs9LquMw== X-Received: by 2002:a05:620a:2986:b0:7ac:a0a5:9bf4 with SMTP id af79cd13be357-7be63246a69mr3897014085a.40.1737564830833; Wed, 22 Jan 2025 08:53:50 -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-7be614ef273sm678089685a.98.2025.01.22.08.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2025 08:53:50 -0800 (PST) Date: Wed, 22 Jan 2025 11:53:48 -0500 From: Gregory Price To: Joshua Hahn Cc: "Huang, Ying" , hyeonggon.yoo@sk.com, rafael@kernel.org, lenb@kernel.org, gregkh@linuxfoundation.org, akpm@linux-foundation.org, honggyu.kim@sk.com, 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: <8734hbiq7j.fsf@DESKTOP-5N7EMDA> <20250122155935.1282897-1-joshua.hahnjy@gmail.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: <20250122155935.1282897-1-joshua.hahnjy@gmail.com> On Wed, Jan 22, 2025 at 07:59:34AM -0800, Joshua Hahn wrote: > On Wed, 22 Jan 2025 09:37:20 +0800 "Huang, Ying" wrote: > > > The current code makes sure that when you switch modes from auto > > > to manual, it inherits the current state - instead of there being > > > some hidden state that suddenly takes precedence. > > > > I think that we can do that with two weight arrays. > > > > > So I prefer to just have one IW array and no hidden state. > > > > Then, when we switch from manual to auto mode, where to find > > auto-generated weights? Re-calculate them? > > Even in manual mode, incoming bandwidth data is continuously stored. > This way, when a user does decide to switch back to auto mode later, > the system doesn't have to retrieve the bandwidth data all over again. > As for the auto-generated weights, they are re-calculated based solely > on the bandwidth data available. (I will note that re-calculating > the weights are very quick, see reduce_interleave_weights) > > Based on your description of the expected behavior, everything you > listed out is actually what currently happens in the one-layer system. > Switching from auto --> manual inherits the auto-generated weights, and > switching from manual --> auto wipes all previous user-stored data. > Piling on - the single-layer system is very bluntly simpler (one fewer array) with the exact same behavior. Therefore it's better (in my opinion). But this is all hidden from the user - so I don't care. If you (Ying) have strong feelings, we're happy to ship either. ~Gregory