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 CC28DC369D7 for ; Thu, 24 Apr 2025 09:47:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 162966B00AB; Thu, 24 Apr 2025 05:47:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0EA9E6B00AE; Thu, 24 Apr 2025 05:47:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E5A356B00B1; Thu, 24 Apr 2025 05:47:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C119B6B00AB for ; Thu, 24 Apr 2025 05:47:28 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id AA3F05F8C6 for ; Thu, 24 Apr 2025 09:47:28 +0000 (UTC) X-FDA: 83368459776.27.751E713 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf28.hostedemail.com (Postfix) with ESMTP id 4017EC0007 for ; Thu, 24 Apr 2025 09:47:26 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=hpteiApT; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf28.hostedemail.com: domain of venkat88@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=venkat88@linux.ibm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1745488046; a=rsa-sha256; cv=none; b=dBApPP/7kSgZhYqUsspk4sNmQx5aALKjDvvfhsqLYqeKdzH+/h+vEQ89yIBF0e7B71NIXj Ly0A/AoynihZTdIdbw/zLIof1b1ZvvRx/WqEuMe8REl1Y0rGGTctqk6BzrW1zyhBglB6CQ p96RBq5FBelit7jkAPYVwmq0Fo/lX8o= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=hpteiApT; dmarc=pass (policy=none) header.from=ibm.com; spf=pass (imf28.hostedemail.com: domain of venkat88@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=venkat88@linux.ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1745488046; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=jAGZPV5GPf63MJ6YElfBbgVWV3zhEIpXqeTLrKOPcJE=; b=PLr28INmya2tvvK+63usgipN1vhr6lzKhlaQ31pj9E+9gSaxZ95lg6k4v8qobPoMxGvb66 fo8B8UMZnAU/jtbUJnMJxslxhdx/9gaGJqzMyVGfjQxMFDJqE5SDEMr1X/ZN1uwAhaBNqP es9LEVLc+LRw7gMck8O/u5xKaBkWP14= Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53O6lw96010644 for ; Thu, 24 Apr 2025 09:47:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=jAGZPV 5GPf63MJ6YElfBbgVWV3zhEIpXqeTLrKOPcJE=; b=hpteiApTcts/d8Nnqri+eI kU6SQL00VD73RV9XKhSUhMX71p1Hhu4m3FfaWUCIcSQelGTbdDZ9efTk6T/atR4c QIiWt2L8IYS9KWi2AFqSgF+q0bCFyjIZ5bMoOWNe0zhfXUmSTOEXIYpXkOBx/22i kWpfZe2RFiUJQM3kICdkyhXW8RgWRMXPcGFf+Fnftnj87N6f8lls5+P1U9fKWBZ2 PFHF+xwaoj1Kj2ExES7Rv9uGNRuogwBBGgM2rkxfxTKnacx/RmFEsR2+QpPKzNe5 xLDE80qXvLz/HTY7O8Rz35ThSrbAzqqBoUxIIIGYrnrdYHQpCnTblCNuvcWdajyw == Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 466xns5msq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 24 Apr 2025 09:47:25 +0000 (GMT) Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 53O9eCdF021144 for ; Thu, 24 Apr 2025 09:47:24 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 466xns5msf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Apr 2025 09:47:24 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 53O7WS7M005820; Thu, 24 Apr 2025 09:47:23 GMT Received: from smtprelay04.wdc07v.mail.ibm.com ([172.16.1.71]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 466jfxfj9q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Apr 2025 09:47:23 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 53O9lN6754788492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Apr 2025 09:47:23 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0478C58052; Thu, 24 Apr 2025 09:47:23 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D2AD458056; Thu, 24 Apr 2025 09:47:14 +0000 (GMT) Received: from [9.61.250.107] (unknown [9.61.250.107]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 24 Apr 2025 09:47:14 +0000 (GMT) Message-ID: Date: Thu, 24 Apr 2025 15:17:12 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 0/2] sched/numa: Skip VMA scanning on memory pinned to one NUMA node via cpuset.mems Content-Language: en-GB To: Libo Chen , akpm@linux-foundation.org, rostedt@goodmis.org, peterz@infradead.org, mgorman@suse.de, mingo@redhat.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, tj@kernel.org, llong@redhat.com Cc: sraithal@amd.com, kprateek.nayak@amd.com, raghavendra.kt@amd.com, yu.c.chen@intel.com, tim.c.chen@intel.com, vineethr@linux.ibm.com, chris.hyser@oracle.com, daniel.m.jordan@oracle.com, lorenzo.stoakes@oracle.com, mkoutny@suse.com, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250424024523.2298272-1-libo.chen@oracle.com> <57892439-7683-43b7-9b03-4553737273b7@linux.ibm.com> From: Venkat Rao Bagalkote In-Reply-To: X-TM-AS-GCONF: 00 X-Authority-Analysis: v=2.4 cv=KplN2XWN c=1 sm=1 tr=0 ts=680a08ac cx=c_pps a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=VwQbUJbxAAAA:8 a=rOUgymgbAAAA:8 a=yPCof4ZbAAAA:8 a=QyXUC8HyAAAA:8 a=zd2uoN0lAAAA:8 a=fxiZjATdOysBrq0T-WwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=MP9ZtiD8KjrkvI0BhSjB:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNDI0MDA2MyBTYWx0ZWRfX6EWw3cTiO79v sH4+lcBcU3Rv1irn+z5vTf0oCgmAYS6ELMDGvyjzOSO+fQMkc4NLnP9q622ADqs8eKkvFm2+Y5r 6ImhHxjbgabVzThwH4dAzYuPGh2xVOOn1QiBXb/+lnjjJB+uls8onqbj0GDRP4sa4ZzZFsQhdkc X4YLrCqIIEx7tylvwbQ5Bweyd41WEgIYnPvIbsE4rsfG9PQ/YUqAuqbZuXIwY4X0QgVQjanBGE4 NH5aszLe63IeBnMKy/2IBJ5U8PdIXM+6uKEnzLeXN4AYfxlbD3ftKbfgJcgr3i31tJXUdnFyRlK bqXioCm/qn3UJvjkCaI76FSReqevEbL+aZc+DamG8DV7NPyW59JpokAjP2WHRzsbfTfppcx07BG ypFpW5ps+T7Lbgi5zvzNCq6vTAZw8Frnx45+ipccjpMNkeuLX6NE+4yymGWC/idAvrBqDb3+ X-Proofpoint-ORIG-GUID: _vgw3Tamx6zPYA9tOBdtiHBAPreJuyTm X-Proofpoint-GUID: _vgw3Tamx6zPYA9tOBdtiHBAPreJuyTm Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.680,FMLib:17.12.80.40 definitions=2025-04-24_04,2025-04-22_01,2025-02-21_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 adultscore=0 bulkscore=0 phishscore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=2 engine=8.19.0-2504070000 definitions=main-2504240063 X-Rspamd-Queue-Id: 4017EC0007 X-Stat-Signature: wkcocpxre5kxffcgoo5xcdtik3336rry X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1745488046-831399 X-HE-Meta: U2FsdGVkX1+co4L9zuz6zKtu7GACvWlIN69yxXB3Uhl7X5s3kvtSAwLx6seyqt9e10AopvNRHNfP4drqOnP2YaLEXT2B3cSOZazy4bcQPdhEpCfDo+1zpI8Q1CRqMX/tAWTSyam15VpeapCj5H1c7q0hLC1hbUfPcB8vPQAqnIi2p4CGTemuSxpeF3QbFSEWISBDfxjHST5jCxPJzEiWkR4MT3USGtdzfqQziJiPTY07GoM7O5h4dLthnHK0lAw+90MBpw6d91u00x9Ev3goA9hG3SziEvzo8wnmM2h1BFhvdNiDY6Vs1o7K+Nc08NErgFPui2LAyFz2bs0xHyRw6BAa1ycJxZrAUBIdQYXOEXYw6zPWYojXVJdlIHWU8p0bAunSqNHD9fGYQg2OizjFS2t4Cwx6ouCXR5z5ZQyo7TBRAr731QKxywOAIHbzDHhvL7jCl1wO2jhgGR45RRkuvbIOb+PxvP1IeRefcETsYVa7U2LE0t0uvsd8mmlZAQKLUkc6OvltSUWxYeA0utnU6OHjoPiTGWpaDTS7jjkKoa+RWZyPOQ79sPYb687sP5DayHQixSQCKHM8SFld4KAKZvH8ohnLzSjz3A7I6pgAecaC7eWbyCMq2v2c4PmP9RSOewY7nl8syjY78DnbTSjUf8PDkGpUlfrbX/PhpbouN5XDvvZtArY+tQZvdv4FFKL2E7VQ+XfffUWAKfp+J7Nq9O/ZHm9CzpMRXutOmENcVNll6ZKY4icmeckZGLt4UmsdBeU0p519S5qr6d4abI8TZm0cl+lUHa1sVYMnbU3DmW/b0Y/zGf8Rpba1Zs4uWDCmLnli0425t1hHiINTSPpEXgWlpLOR1Y6BGBlWKm9KZ5BNeqrjscDBB0IhIfSRa5JoCF+7Iy4QQIaehPOkT/ExeIAIGPQF4SWdzkNqE7dlsFOzRyou9Mpaz8XaS4cjIiywSXmyshZyi6BGMOkU7EQ wk3OUb7t PuHlQ4xiw/0Agewxjw1vYl0f/mnJJ/ZAZhAtM0A/0HhgrsRNkZdpG21z3lacLCxsTxSTw7u2pSrqteydggW9UU4euukdROudO7BgN8md0nPoad4PFjboqkxnngcTffbDZwp3gCT5Zgz8aqxuRuaZb76Fd12srii8XpQpj67zlkOU3CvJK3ERhVqmzH2jZhSne8SZsnwEcMZAhw+HIUxRrGtvNYZLvCKcp3NdVzwM7dE9cHrQircYWr4WJM+bUz4CYBVEC8x4b1bW4vXN2GQbY/ndTsb2ICzyhujPNFS1eGNMCHUueAFtkzBTkvl6C851cjZVcPIiDIotf+Hu7GGWA+ys52/q1XQ4PEDSfGMhDhIzzUybuj3BQyVvewq4bOD04PLMBx8RVy0iWlaKPMYDK2gf7O4SfapotheIrVqJrieQCC1VD34Q+KtStmyDwGsnlSn4d 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: List-Subscribe: List-Unsubscribe: On 24/04/25 1:16 pm, Libo Chen wrote: > > On 4/24/25 00:05, Venkat Rao Bagalkote wrote: >> On 24/04/25 8:15 am, Libo Chen wrote: >>> v1->v2: >>> 1. add perf improvment numbers in commit log. Yet to find perf diff on >>> will-it-scale, so not included here. Plan to run more workloads. >>> 2. add tracepoint. >>> 3. To peterz's comment, this will make it impossible to attract tasks to >>> those memory just like other VMA skippings. This is the current >>> implementation, I think we can improve that in the future, but at the >>> moment it's probabaly better to keep it consistent. >>> >>> v2->v3: >>> 1. add enable_cpuset() based on Mel's suggestion but again I think it's >>> redundant. >>> 2. print out nodemask with %*p.. format in the tracepoint. >>> >>> v3->v4: >>> 1. fix an unsafe dereference of a pointer to content not on ring buffer, >>> namely mem_allowed_ptr in the tracepoint. >>> >>> v4->v5: >>> 1. add BUILD_BUG_ON() in TP_fast_assign() to guard against future >>> changes (particularly in size) in nodemask_t. >>> >>> Libo Chen (2): >>> =C2=A0=C2=A0 sched/numa: Skip VMA scanning on memory pinned to one NUM= A node via >>> =C2=A0=C2=A0=C2=A0=C2=A0 cpuset.mems >>> =C2=A0=C2=A0 sched/numa: Add tracepoint that tracks the skipping of nu= ma balancing >>> =C2=A0=C2=A0=C2=A0=C2=A0 due to cpuset memory pinning >>> >>> =C2=A0 include/trace/events/sched.h | 33 +++++++++++++++++++++++++++++= ++++ >>> =C2=A0 kernel/sched/fair.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 |=C2=A0 9 +++++++++ >>> =C2=A0 2 files changed, 42 insertions(+) >>> >> Hello Libo, >> >> >> For some reason I am not able to apply this patch. I am trying to test t= he boot warning[1]. >> >> I am trying to apply on top of next-20250423. Below is the error. Am I m= issing anything? >> >> [1]: https://lore.kernel.org/all/20250422205740.02c4893a@canb.auug.org.a= u/=20 >> Error: >> >> git am -i v5_20250423_libo_chen_sched_numa_skip_vma_scanning_on_memory_p= inned_to_one_numa_node_via_cpuset_mems.mbx >> Commit Body is: >> -------------------------- >> sched/numa: Skip VMA scanning on memory pinned to one NUMA node via cpus= et.mems >> >> When the memory of the current task is pinned to one NUMA node by cgroup, >> there is no point in continuing the rest of VMA scanning and hinting page >> faults as they will just be overhead. With this change, there will be no >> more unnecessary PTE updates or page faults in this scenario. >> >> We have seen up to a 6x improvement on a typical java workload running on >> VMs with memory and CPU pinned to one NUMA node via cpuset in a two-sock= et >> AARCH64 system. With the same pinning, on a 18-cores-per-socket Intel >> platform, we have seen 20% improvment in a microbench that creates a >> 30-vCPU selftest KVM guest with 4GB memory, where each vCPU reads 4KB >> pages in a fixed number of loops. >> >> Signed-off-by: Libo Chen >> Tested-by: Chen Yu >> Tested-by: K Prateek Nayak >> -------------------------- >> Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all: a >> Applying: sched/numa: Skip VMA scanning on memory pinned to one NUMA nod= e via cpuset.mems >> error: patch failed: kernel/sched/fair.c:3329 >> error: kernel/sched/fair.c: patch does not apply >> Patch failed at 0001 sched/numa: Skip VMA scanning on memory pinned to o= ne NUMA node via cpuset.mems >> >> > Hi Venkat, > > I just did git am -i t.mbox on top of next-20250423, not sure why but the= second patch was ahead of the > first patch in apply order, have you made sure the second patch was not a= pplied before the first one? > > - Libo Hi Libo, Apolozies!!! I freshly cloned and tried and it worked now. So, please ignore my=20 earlier mail. Regards, Venkat. >> Regards, >> >> Venkat. >> >> >> >