From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6AA0155342 for ; Thu, 19 Dec 2024 19:52:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734637964; cv=none; b=dBSorGKn/ll4GBzWyNkqDG+XDaA5QoT4MHDmsEbri/jfJh2AqatyjKL3Hpa+FvXurualzOqzp+czzChbFjvKwbgdMivxo7hWRhMa5SPfsvomrs0o274hmsC0FkYcvMpWt8Lf6bbfNdrRTGPPjndwgz3nd36sxQqAJ+2VrsGjaGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734637964; c=relaxed/simple; bh=ajTGoBAhNVg3s95+qTHBEzoJT2hfdcRHBqghvxMoLo8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=b9ACtNlLGCZcJolRdWL84zrErNA7bxGQMb++YvGx051PkQukIjzRg+YjLSG278NpvGMWP6s00UayF8Ke+wDEfmZTB4MbOBSI2h0gWXbkd/2dOqT0Ma7t7K/+uLYk0FKhYEQztcZEP+Akgqid4xoZt0Cdo2Lul1GBA7FoZyCR0oY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=JSrXZ2fm; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="JSrXZ2fm" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=LT0e4Us5+Ev+c1zxGaswbmdA7SP6hSwc+/6XoeAxj1U=; b=JSrXZ2fm3mF4iRDYrHtG/b9OBd geE9+19XYAdJqWZVKvoLuEcM057lgPcFxdKNtjO83k6yjaK0NhEs0uHZZA9cXM1IkGuH9fNZ/bLhY b/qIO94akM+R1ODvjgVhNqpS1N7QUc1zVcUZEwugKm5od13nLY7Q0KefWTg7At1WVb9vbzm84mM/Z vbs8baOH3d6cAaxbZcgIgbG8sdZsOLW0ArovQWjZno/6KR2UrX4T8WW08nndKJT4F6pRSWxK9MPvO kfl9tbfpvY6Tcq3vzPaXBOCXScdBENZB8aSY9fc1rymLowWBcrBoU4Ib1uA/2sg9a0YYb9rhMRYQS e0qJXG2A==; Received: from 77-249-17-89.cable.dynamic.v4.ziggo.nl ([77.249.17.89] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tOMZT-00000005UxS-3YUn; Thu, 19 Dec 2024 19:52:32 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 174B73003C4; Thu, 19 Dec 2024 20:52:31 +0100 (CET) Date: Thu, 19 Dec 2024 20:52:30 +0100 From: Peter Zijlstra To: Yury Norov Cc: Tejun Heo , Andrea Righi , David Vernet , Changwoo Min , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] sched/topology: introduce for_each_numa_hop_node() / sched_numa_hop_node() Message-ID: <20241219195230.GG26279@noisy.programming.kicks-ass.net> References: <20241217094156.577262-1-arighi@nvidia.com> <20241217094156.577262-2-arighi@nvidia.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: On Thu, Dec 19, 2024 at 10:26:59AM -0800, Yury Norov wrote: > > Given that there usually aren't that many nodes, the current implementation > > is probably fine too, so please feel free to ignore this suggestion for now > > too. > > I agree. The number of nodes on typical system is 1 or 2. Even if > it's 8, the Andrea's bubble sort will be still acceptable. So, I'm > OK with O(N^2) if you guys OK with it. I only would like to have > this choice explained in commit message. There are systems with 100s or 1000s of nodes out there. As long as hitting this code path is optional I suppose that's not a problem, but if not, they're going to be rather upset.