svn commit: r356727 - head/sys/compat/linux

Edward Tomasz Napierala trasz at FreeBSD.org
Tue Jan 14 11:24:07 UTC 2020


Author: trasz
Date: Tue Jan 14 11:24:06 2020
New Revision: 356727
URL: https://svnweb.freebsd.org/changeset/base/356727

Log:
  Make linux getcpu(2) report the domain.
  
  Submitted by:	markj
  Reviewed by:	markj
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D23144

Modified:
  head/sys/compat/linux/linux_misc.c

Modified: head/sys/compat/linux/linux_misc.c
==============================================================================
--- head/sys/compat/linux/linux_misc.c	Tue Jan 14 10:13:44 2020	(r356726)
+++ head/sys/compat/linux/linux_misc.c	Tue Jan 14 11:24:06 2020	(r356727)
@@ -2354,7 +2354,7 @@ linux_getcpu(struct thread *td, struct linux_getcpu_ar
 
 	cpu = td->td_oncpu; /* Make sure it doesn't change during copyout(9) */
 	error = 0;
-	node = 0; /* XXX: Fake NUMA node 0 for now */
+	node = cpuid_to_pcpu[cpu]->pc_domain;
 
 	if (args->cpu != NULL)
 		error = copyout(&cpu, args->cpu, sizeof(l_int));


More information about the svn-src-head mailing list