From owner-svn-src-head@freebsd.org Tue Jul 10 22:00:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB7A10318A2; Tue, 10 Jul 2018 22:00:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C20C8E515; Tue, 10 Jul 2018 22:00:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4A9241AC5; Tue, 10 Jul 2018 22:00:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6AM0Mh8035158; Tue, 10 Jul 2018 22:00:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6AM0LgC035151; Tue, 10 Jul 2018 22:00:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807102200.w6AM0LgC035151@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 10 Jul 2018 22:00:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336182 - in head: . lib/libc/sys share/man/man4 sys/sys usr.bin usr.bin/numactl X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head: . lib/libc/sys share/man/man4 sys/sys usr.bin usr.bin/numactl X-SVN-Commit-Revision: 336182 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jul 2018 22:00:23 -0000 Author: kib Date: Tue Jul 10 22:00:20 2018 New Revision: 336182 URL: https://svnweb.freebsd.org/changeset/base/336182 Log: Remove bits of the old NUMA. Remove numactl(1), edit numa(4) to bring it some closer to reality, provide libc ABI shims for old NUMA syscalls. Noted and reviewed by: brooks (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D16142 Deleted: head/lib/libc/sys/numa_getaffinity.2 head/sys/sys/numa.h head/usr.bin/numactl/ Modified: head/ObsoleteFiles.inc head/lib/libc/sys/Makefile.inc head/lib/libc/sys/compat-stub.c head/share/man/man4/numa.4 head/usr.bin/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 10 21:20:49 2018 (r336181) +++ head/ObsoleteFiles.inc Tue Jul 10 22:00:20 2018 (r336182) @@ -38,6 +38,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20180710: old numa cleanup +OLD_FILES+=usr/include/sys/numa.h +OLD_FILES+=usr/share/man/man2/numa_getaffinity.2.gz +OLD_FILES+=usr/share/man/man2/numa_setaffinity.2.gz +OLD_FILES+=usr/share/man/man1/numactl.1.gz +OLD_FILES+=usr/bin/numactl # 20180630: new clang import which bumps version from 6.0.0 to 6.0.1. OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/allocator_interface.h OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/asan_interface.h Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Tue Jul 10 21:20:49 2018 (r336181) +++ head/lib/libc/sys/Makefile.inc Tue Jul 10 22:00:20 2018 (r336182) @@ -258,7 +258,6 @@ MAN+= abort2.2 \ nanosleep.2 \ nfssvc.2 \ ntp_adjtime.2 \ - numa_getaffinity.2 \ open.2 \ pathconf.2 \ pdfork.2 \ @@ -430,7 +429,6 @@ MLINKS+=mount.2 nmount.2 \ MLINKS+=mq_receive.2 mq_timedreceive.2 MLINKS+=mq_send.2 mq_timedsend.2 MLINKS+=ntp_adjtime.2 ntp_gettime.2 -MLINKS+=numa_getaffinity.2 numa_setaffinity.2 MLINKS+=open.2 openat.2 MLINKS+=pathconf.2 fpathconf.2 MLINKS+=pathconf.2 lpathconf.2 Modified: head/lib/libc/sys/compat-stub.c ============================================================================== --- head/lib/libc/sys/compat-stub.c Tue Jul 10 21:20:49 2018 (r336181) +++ head/lib/libc/sys/compat-stub.c Tue Jul 10 22:00:20 2018 (r336182) @@ -54,3 +54,5 @@ __sym_compat(symbol, __compat_enosys ## symbol, versio __compat_nosys(netbsd_lchown, FBSD_1.0); __compat_nosys(netbsd_msync, FBSD_1.0); +__compat_nosys(numa_getaffinity, FBSD_1.4); +__compat_nosys(numa_setaffinity, FBSD_1.4); Modified: head/share/man/man4/numa.4 ============================================================================== --- head/share/man/man4/numa.4 Tue Jul 10 21:20:49 2018 (r336181) +++ head/share/man/man4/numa.4 Tue Jul 10 22:00:20 2018 (r336182) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 10, 2015 +.Dd July 10, 2018 .Dt NUMA 4 .Os .Sh NAME @@ -34,7 +34,6 @@ .Cd options SMP .Cd options MAXMEMDOM=16 .Pp -.In sys/numa.h .In sys/cpuset.h .In sys/bus.h .Sh DESCRIPTION @@ -51,20 +50,21 @@ that is connected to one of the other processors. .Pp .Nm is enabled when the -.Cd MAXMEMDOM +.Cd NUMA option is used in a kernel configuration -file and is set to a value greater than 1. +file and the +.Cd MAXMEMDOM +option is set to a value greater than 1. .Pp Thread and process .Nm policies are controlled with the -.Xr numa_setaffinity 2 +.Xr cpuset_getdomain 2 and -.Xr numa_getaffinity 2 +.Xr cpuset_setdomain 2 syscalls. -.Pp The -.Xr numactl 1 +.Xr cpuset 1 tool is available for starting processes with a non-default policy, or to change the policy of an existing thread or process. .Pp @@ -83,15 +83,6 @@ MIB variables: .It Va vm.ndomains The number of VM domains which have been detected. .Pp -.It Va vm.default_policy -The default VM domain allocation policy. -Defaults to "first-touch-rr". -The valid values are "first-touch", "first-touch-rr", -"rr", where "rr" is a short-hand for "round-robin." -See -.Xr numa_setaffinity 2 -for more information about the available policies. -.Pp .It Va vm.phys_locality A table indicating the relative cost of each VM domain to each other. A value of 10 indicates equal cost. @@ -111,36 +102,11 @@ domains are mapped into a contiguous, non-sparse VM domain space, starting from 0. Thus, VM domain information (for example, the domain identifier) is not necessarily the same as is found in the hardware specific information. -.Pp -The -.Nm -allocation policies are implemented as a policy and iterator in -.Pa sys/vm/vm_domain.c -and -.Pa sys/vm/vm_domain.h . Policy information is available in both struct thread and struct proc. -Processes inherit -.Nm -policy from parent processes and threads inherit -.Nm -policy from parent threads. -Note that threads do not explicitly inherit their -.Nm -policy from processes. -Instead, if no thread policy is set, the system -will fall back to the process policy. -.Pp -For now, -.Nm -domain policies only influence physical page allocation in -.Pa sys/vm/vm_phys.c . -This is useful for userland memory allocation, but not for kernel -and driver memory allocation. -These features will be implemented in future work. .Sh SEE ALSO -.Xr numactl 1 , -.Xr numa_getaffinity 2 , -.Xr numa_setaffinity 2 , +.Xr cpuset 1 , +.Xr cpuset_getaffinity 2 , +.Xr cpuset_setaffinity 2 , .Xr bus_get_domain 9 .Sh HISTORY .Nm @@ -156,13 +122,15 @@ The .Xr numa_getaffinity 2 and .Xr numa_setaffinity 2 -syscalls first appeared in -.Fx 11.0 . -.Pp -The +syscalls and the .Xr numactl 1 tool first appeared in -.Fx 11.0 . +.Fx 11.0 +and were removed in +.Fx 12.0 . +Current implementation appeared in +.Fx 12.0 . +.Pp .Sh AUTHORS This manual page written by .An Adrian Chadd Aq Mt adrian@FreeBSD.org . Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Tue Jul 10 21:20:49 2018 (r336181) +++ head/usr.bin/Makefile Tue Jul 10 22:00:20 2018 (r336182) @@ -104,7 +104,6 @@ SUBDIR= alias \ nfsstat \ nice \ nl \ - numactl \ nohup \ opieinfo \ opiekey \