From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.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 630F92940F for ; Tue, 7 Jan 2025 13:03:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736255035; cv=none; b=iHVI97YGqOUPViaYCjWQASbFXaOxwPnTASkRbd/BrVqcp8nVx1LPDQOswBxZN4+Iqvi206cRxZeq5PdC3h69cGaXxgGJRrBMg1792SOMtEk66xsudSnak/KZoFmcWKeQZwS+zaamPA0TeUEzWd91fCBMIaORPz+5puX0Aq4kgGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736255035; c=relaxed/simple; bh=ku/uwzMNEesuWE4w0jDfijlpJIsS/3nHPjZw+oy1apg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WxlYhssMb4UbteAwyp5UT3BJk3eNAlJkb2hzRuBHsRVyqlXu45H9Dz4T3HGsC69o5Fnpr/UrXJ8EMqMGfKZ1dWTnv1234fe9CFDAjXRDsVtQWdzgEmJzAo0LJqind1kCUshKqI0B9Uu318A1tTU5SV8QhE5pxJ1ksysixAh9af4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=UVVRn9v2; arc=none smtp.client-ip=209.85.216.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="UVVRn9v2" Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-2f13acbe29bso20121465a91.1 for ; Tue, 07 Jan 2025 05:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1736255032; x=1736859832; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=/SrdE2+qpVTMHC2gkWJcUk3ruu39gNQmu5m8z1OSqQw=; b=UVVRn9v2z/+aYVW5sDksUe6QNHPfWy8mq0dBOksEqQur1CISmpoxJtYuYWng0DJWCA re1b0iFd5U8LbY4zG8ttaeGvyXsuoexjYGTaMHCWWhAm571jdtrqX5ljcUJYZCkTq8rA axjTJT8BOd9DkihLTPY7bieuIVY3XLaFGybHGDoZNEqA/MEyq1gG+yV5XQrb20HFHFX6 FfCM86LeXakoX0yB229Pt9Zypw8UivQXvtwl8SW1xyq/kaFbhDNcmx3xeTA5NCUr8Old sg0fJvwQ9aRSMa3wDny56M2h2vEZob15VfkePE9uN4e5iGUXsxO5jiJOxoM6OGLb3lRw CN8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736255032; x=1736859832; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/SrdE2+qpVTMHC2gkWJcUk3ruu39gNQmu5m8z1OSqQw=; b=DXkhlpR0h9ZDpOuGWEIwSxdbFa/YJo16HbL/KfHQRyP8J7k+xqHNw1kN4MIM0S/VKl woptK7nidFZ9a8Ahl6NIVHpOmqQ0w+2Qiwst06gs873MprMZOHBuCJQFiah3ZUccOAj6 m2KM+MEKRc9DGvx3NDcukYKPBaVbMB0+Hf87uf+xBS7IKjv6Dn5D2dhnYaZST3UyI7c+ 0OaD72g5ShtUEjUuy0p7/S3YaSHOQXQGbpgb1FH3pjd9k5kQuV5ebqUvTxrTv84+XVoq HBuFd8gAu1fAAS9voSbddvDZfwkbYgjMJ0qrqT64TtOVFWuxdEH47H7+ies0Jk6G9h+T iRYw== X-Forwarded-Encrypted: i=1; AJvYcCXFCTOwBiaRM5ipBO3CI2ctT0mV9UuBOddwMSGVPQH7Zv8DFDHEYmJrVMRhgqtgpvARuEWj769ti/mb77g=@vger.kernel.org X-Gm-Message-State: AOJu0YxMAN1Oup3mk2Q0NNZGq8AS4ifkUlv8CVcnml0Dr9g+2VLG0kMZ 10XoQfeNrOz7IsBv9cD+QvzCtk5LnjSYOMHKdW5/HJWozx9Zja3cjAFBBtI3T3g= X-Gm-Gg: ASbGncuwt3JHBvqf4HdQDAysg5CXoCPNF4zfDnrHp/XAHNdjfrY9qZuWLe1FOc9vOE/ XMxNbRn7jA3qnAa9gvwVKcCAjvx8Bz5UBT9jNUznZp7a4EME0y8i3kBuWTcq6j5QBrKOBQVHhEv 7IltF3p81TgTbM6zNRU3WH0eKYVEAu2LTzHkhoRWb/OESqL32yLz/xozKlxyEQIjoRutTDcoKkd wMEYUKEjH5Nd1/sc2V+k6lsuGIIBXAk/6F48TpSaXm3ovcJE60HgYK3/lmqQp8wgdlHBCBVKMOR X-Google-Smtp-Source: AGHT+IH/vQkYI5dZkAk174cWOADF4qENWfptihfXbD7heylPW0Ny2qij9BE9GlmYjhxn2xcZM97AWA== X-Received: by 2002:a17:90b:51c2:b0:2ee:7504:bb3d with SMTP id 98e67ed59e1d1-2f53ca545d3mr4805705a91.0.1736255032559; Tue, 07 Jan 2025 05:03:52 -0800 (PST) Received: from [10.84.152.18] ([63.216.146.178]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f2ee06dd77sm41632712a91.33.2025.01.07.05.03.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jan 2025 05:03:52 -0800 (PST) Message-ID: <17c4b89f-8585-47f8-837d-907b30002f22@bytedance.com> Date: Tue, 7 Jan 2025 21:03:43 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/3] Take the scheduling domain into account in numa balancin To: Peter Zijlstra Cc: mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, longman@redhat.com, riel@surriel.com, chengming.zhou@linux.dev, kprateek.nayak@amd.com, linux-kernel@vger.kernel.org References: <20250103065930.413464-1-zhouchuyi@bytedance.com> <20250103113617.GE22934@noisy.programming.kicks-ass.net> <20250107104824.GL20870@noisy.programming.kicks-ass.net> From: Chuyi Zhou In-Reply-To: <20250107104824.GL20870@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 在 2025/1/7 18:48, Peter Zijlstra 写道: > On Fri, Jan 03, 2025 at 08:40:18PM +0800, Chuyi Zhou wrote: >> Hello Peter, >> >> 在 2025/1/3 19:36, Peter Zijlstra 写道: >>> Your $subject and actual patches do not patch. >>> >>> Your subject suggests you're taking the scheduling domains into account >>> for numa balancing, your actual patches are bunch of special case hacks >>> that totally ignore the actual sched domains >> >> The subject is indeed inappropriate, but the issues mentioned in this >> patchset still exist, right? >> >> - We should not consider isolated CPUs in numa_stats. >> - We should not select isolated CPUs as candidate CPUs. >> >> The current patch handle the above cases with hacks because I thought this >> kind of change is minimal to fix this issue. Perhaps you have a better >> solution for this issue? If so, please let me know, and I am more than >> willing to continue addressing this problem. > > I would much rather see you do what the subject claims :-) > > At the very least you should mask the whole thing against rq->rd->span > if there is a rq->rd at all ofcourse. This is not just the iteration in > update_numa_stats() but also the for_each_node_state() iteration. > > I'm not sure there's anything saner than: > > cpumask_intersects(rq->rd->span, cpumask_of_node(nid)) > Thank you for your suggestion. It will be implemented in the next version. Thansk.