linux-yocto/Documentation
Chen Yu db6cc3f4ac Revert "sched/numa: add statistics of numa balance task"
This reverts commit ad6b26b6a0.

This commit introduces per-memcg/task NUMA balance statistics, but
unfortunately it introduced a NULL pointer exception due to the following
race condition: After a swap task candidate was chosen, its mm_struct
pointer was set to NULL due to task exit.  Later, when performing the
actual task swapping, the p->mm caused the problem.

CPU0                                   CPU1
:
...
task_numa_migrate
     task_numa_find_cpu
      task_numa_compare
        # a normal task p is chosen
        env->best_task = p

                                          # p exit:
                                          exit_signals(p);
                                             p->flags |= PF_EXITING
                                          exit_mm
                                             p->mm = NULL;

      migrate_swap_stop
        __migrate_swap_task((arg->src_task, arg->dst_cpu)
         count_memcg_event_mm(p->mm, NUMA_TASK_SWAP)# p->mm is NULL

task_lock() should be held and the PF_EXITING flag needs to be checked to
prevent this from happening.  After discussion, the conclusion was that
adding a lock is not worthwhile for some statistics calculations.  Revert
the change and rely on the tracepoint for this purpose.

Link: https://lkml.kernel.org/r/20250704135620.685752-1-yu.c.chen@intel.com
Link: https://lkml.kernel.org/r/20250708064917.BBD13C4CEED@smtp.kernel.org
Fixes: ad6b26b6a0 ("sched/numa: add statistics of numa balance task")
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Reported-by: Jirka Hladky <jhladky@redhat.com>
Closes: https://lore.kernel.org/all/CAE4VaGBLJxpd=NeRJXpSCuw=REhC5LWJpC29kDy-Zh2ZDyzQZA@mail.gmail.com/
Reported-by: Srikanth Aithal <Srikanth.Aithal@amd.com>
Reported-by: Suneeth D <Suneeth.D@amd.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Hladky <jhladky@redhat.com>
Cc: Libo Chen <libo.chen@oracle.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-07-09 21:07:56 -07:00
..
ABI Power management fixes for 6.16-rc5 2025-07-04 17:27:30 -07:00
accel
accounting
admin-guide Revert "sched/numa: add statistics of numa balance task" 2025-07-09 21:07:56 -07:00
arch docs: arm64: Fix ICC_SRE_EL2 register typo in booting.rst 2025-06-12 15:50:00 +01:00
block Documentation: ublk: Separate UBLK_F_AUTO_BUF_REG fallback behavior sublists 2025-06-13 09:25:42 -06:00
bpf bpf: Adjust free target to avoid global starvation of LRU map 2025-06-18 18:50:14 -07:00
cdrom
core-api Kbuild updates for v6.16 2025-06-07 10:05:35 -07:00
cpu-freq
crypto
dev-tools Documentation: kunit: improve example on testing static functions 2025-05-19 13:22:21 -06:00
devicetree i2c-for-6.16-rc5 2025-07-05 12:54:24 -07:00
doc-guide Docs: doc-guide: update sphinx.rst Sphinx version number 2025-05-21 04:28:29 -06:00
driver-api Char/Misc/IIO pull request for 6.16-rc1 2025-06-06 11:50:47 -07:00
edac cxl/edac: Add CXL memory device soft PPR control feature 2025-05-23 13:25:06 -07:00
fault-injection
fb fbdev: sstfb.rst: Fix spelling mistake 2025-05-31 10:24:02 +02:00
features LoongArch: Enable ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS 2025-05-30 21:45:42 +08:00
filesystems Several mount-related fixes 2025-06-25 20:48:48 -07:00
firmware_class
firmware-guide
fpga
gpu Documentation: nouveau: Update GSP message queue kernel-doc reference 2025-06-13 16:46:35 +02:00
hid
hwmon hwmon updates for v6.16 2025-06-03 09:11:26 -07:00
i2c docs: i2c: Fix "resitors" to "resistors" 2025-05-20 11:22:16 +02:00
iio docs: iio: ad3552r: fix malformed table 2025-05-21 14:19:46 +01:00
images
infiniband
input Input: amijoy - make headings compliant w/ guidelines in documentation 2025-05-30 15:34:38 -07:00
isdn
kbuild Kbuild updates for v6.16 2025-06-07 10:05:35 -07:00
kernel-hacking
leds LEDs for v6.16 2025-06-03 12:10:31 -07:00
litmus-tests
livepatch
locking
maintainer
mhi
misc-devices misc: amd-sbi: Add document for AMD SB IOCTL description 2025-05-21 14:44:41 +02:00
mm Docs/damon: update titles and brief introductions to explain DAMOS 2025-05-22 14:55:38 -07:00
netlabel
netlink netlink: specs: enforce strict naming of properties 2025-06-25 15:36:28 -07:00
networking doc: tls: socket needs to be established to enable ulp 2025-06-27 15:33:01 -07:00
nvdimm
nvme
PCI Merge branch 'pci/misc' 2025-06-04 10:50:45 -05:00
pcmcia
peci
power
process docs: netdev: correct the heading level for co-posting selftests 2025-06-27 15:31:24 -07:00
RCU
rust Documentation: rust: testing: add docs on the new KUnit #[test] tests 2025-05-27 20:09:59 +02:00
scheduler sched_ext: Changes for v6.16 2025-05-27 21:12:50 -07:00
scsi
security
sound ASoC: doc: cs35l56: Add CS35L63 to the list of supported devices 2025-06-18 17:22:48 +01:00
sphinx docs: kerneldoc.py: simplify exception handling logic 2025-05-21 03:53:40 -06:00
sphinx-static
spi
staging rpmsg updates for v6.16 2025-06-02 11:06:44 -07:00
sunrpc/xdr
target
tee
timers
tools
trace Char/Misc/IIO pull request for 6.16-rc1 2025-06-06 11:50:47 -07:00
translations Kbuild updates for v6.16 2025-06-07 10:05:35 -07:00
usb
userspace-api LoongArch changes for v6.16 2025-06-07 09:56:18 -07:00
virt KVM: TDX: Exit to userspace for GetTdVmCallInfo 2025-06-20 13:55:47 -04:00
w1
watchdog
wmi platform/x86: wmi: Update documentation of WCxx/WExx ACPI methods 2025-06-26 18:19:27 +03:00
.gitignore
atomic_bitops.txt
atomic_t.txt
Changes
CodingStyle
conf.py docs: conf.py: drop backward support for old Sphinx versions 2025-05-19 08:02:14 -06:00
docutils.conf
index.rst
Kconfig
Makefile
memory-barriers.txt
SubmittingPatches
subsystem-apis.rst