CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Fri Dec 16 19:49:13 UTC 2022 Modified Files: src/usr.sbin/sysinst: bsddisklabel.c Log Message: Switch back to FFSv2ea as default for new installations To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/usr.sbin/sysinst/bsddisklabel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/sysinst/bsddisklabel.c diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.69 src/usr.sbin/sysinst/bsddisklabel.c:1.70 --- src/usr.sbin/sysinst/bsddisklabel.c:1.69 Thu Dec 15 15:32:04 2022 +++ src/usr.sbin/sysinst/bsddisklabel.c Fri Dec 16 19:49:13 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: bsddisklabel.c,v 1.69 2022/12/15 15:32:04 martin Exp $ */ +/* $NetBSD: bsddisklabel.c,v 1.70 2022/12/16 19:49:13 martin Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -144,9 +144,9 @@ default_parts_init[] = .flags = PUIFLG_JUST_MOUNTPOINT }, #endif { .def_size = DEFUSRSIZE*(MEG/512), .mount = "/usr", .type = PT_root, - .fs_type = FS_BSDFFS, .fs_version = 2 }, + .fs_type = FS_BSDFFS, .fs_version = 3 }, { .def_size = DEFVARSIZE*(MEG/512), .mount = "/var", .type = PT_root, - .fs_type = FS_BSDFFS, .fs_version = 2 }, + .fs_type = FS_BSDFFS, .fs_version = 3 }, }; static const char size_separator[] = @@ -366,7 +366,7 @@ add_other_ptn_size(menudesc *menu, void p->cur_part_id = NO_PART; p->type = PT_root; p->fs_type = FS_BSDFFS; - p->fs_version = 2; + p->fs_version = 3; strncpy(p->mount, new_mp, sizeof(p->mount)); menu->cursel = pset->num; @@ -1052,7 +1052,7 @@ fill_defaults(struct partition_usage_set #ifndef HAVE_UFS2_BOOT if (boot < wanted->num || i != root) #endif - wanted->infos[i].fs_version = 2; + wanted->infos[i].fs_version = 3; #endif } }
CVS commit: src/usr.sbin/sysinst
Module Name:src Committed By: martin Date: Fri Dec 16 19:49:13 UTC 2022 Modified Files: src/usr.sbin/sysinst: bsddisklabel.c Log Message: Switch back to FFSv2ea as default for new installations To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/usr.sbin/sysinst/bsddisklabel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src
Module Name:src Committed By: martin Date: Fri Dec 16 19:12:50 UTC 2022 Modified Files: src/doc [netbsd-10]: LAST_MINUTE README.files src/external/gpl2/groff/tmac [netbsd-10]: mdoc.local src/sys/sys [netbsd-10]: param.h Added Files: src/doc [netbsd-10]: CHANGES-10.0 Log Message: Welcome to 10.0_BETA! To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-10.0 cvs rdiff -u -r1.2 -r1.2.74.1 src/doc/LAST_MINUTE cvs rdiff -u -r1.5 -r1.5.34.1 src/doc/README.files cvs rdiff -u -r1.7 -r1.7.6.1 src/external/gpl2/groff/tmac/mdoc.local cvs rdiff -u -r1.722 -r1.722.2.1 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/LAST_MINUTE diff -u src/doc/LAST_MINUTE:1.2 src/doc/LAST_MINUTE:1.2.74.1 --- src/doc/LAST_MINUTE:1.2 Mon Sep 23 07:52:18 2002 +++ src/doc/LAST_MINUTE Fri Dec 16 19:12:49 2022 @@ -1,7 +1,7 @@ -# $NetBSD: LAST_MINUTE,v 1.2 2002/09/23 07:52:18 lukem Exp $ +# $NetBSD: LAST_MINUTE,v 1.2.74.1 2022/12/16 19:12:49 martin Exp $ -This file contains important information on the NetBSD XXX.XXX release that +This file contains important information on the NetBSD 10.0 release that did not make it into the main documentation. [all] - Nothing pertinent; this is NetBSD-current... + Nothing pertinent. Index: src/doc/README.files diff -u src/doc/README.files:1.5 src/doc/README.files:1.5.34.1 --- src/doc/README.files:1.5 Thu Sep 6 22:20:38 2012 +++ src/doc/README.files Fri Dec 16 19:12:49 2022 @@ -1,8 +1,12 @@ -# $NetBSD: README.files,v 1.5 2012/09/06 22:20:38 riz Exp $ +# $NetBSD: README.files,v 1.5.34.1 2022/12/16 19:12:49 martin Exp $ What's in this directory: -CHANGES Changes between the XXX.XXX-1 and XXX.XXX releases. + +CHANGES Changes between the 9.0 and 10.0 releases. + +CHANGES-10.0 Changes between the creation of the netbsd-10 branch and + the 10.0 release. CHANGES.prev Changes in previous NetBSD releases. Index: src/external/gpl2/groff/tmac/mdoc.local diff -u src/external/gpl2/groff/tmac/mdoc.local:1.7 src/external/gpl2/groff/tmac/mdoc.local:1.7.6.1 --- src/external/gpl2/groff/tmac/mdoc.local:1.7 Wed Sep 2 09:28:25 2020 +++ src/external/gpl2/groff/tmac/mdoc.local Fri Dec 16 19:12:49 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: mdoc.local,v 1.7 2020/09/02 09:28:25 kim Exp $ +.\" $NetBSD: mdoc.local,v 1.7.6.1 2022/12/16 19:12:49 martin Exp $ .\" .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -44,9 +44,9 @@ .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq]) . .\" Default .Os value -.ds doc-operating-system NetBSD\~9.99 +.ds doc-operating-system NetBSD\~10.0_BETA .\" Default footer operating system value -.ds doc-default-operating-system NetBSD\~9.99 +.ds doc-default-operating-system NetBSD\~10.0_BETA .\" Other known versions, not yet in groff distribution .ds doc-operating-system-NetBSD-1.3.3 1.3.3 .ds doc-operating-system-NetBSD-1.6.3 1.6.3 Index: src/sys/sys/param.h diff -u src/sys/sys/param.h:1.722 src/sys/sys/param.h:1.722.2.1 --- src/sys/sys/param.h:1.722 Mon Dec 5 05:56:20 2022 +++ src/sys/sys/param.h Fri Dec 16 19:12:49 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.722 2022/12/05 05:56:20 skrll Exp $ */ +/* $NetBSD: param.h,v 1.722.2.1 2022/12/16 19:12:49 martin Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 999010800 /* NetBSD 9.99.108 */ +#define __NetBSD_Version__ 10 /* NetBSD 10.0_BETA */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__) Added files: Index: src/doc/CHANGES-10.0 diff -u /dev/null src/doc/CHANGES-10.0:1.1.2.1 --- /dev/null Fri Dec 16 19:12:50 2022 +++ src/doc/CHANGES-10.0 Fri Dec 16 19:12:49 2022 @@ -0,0 +1,12 @@ +# $NetBSD: CHANGES-10.0,v 1.1.2.1 2022/12/16 19:12:49 martin Exp $ + +A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16 +until the 10.0 release: + +doc/CHANGES-10.0created +doc/LAST_MINUTE patched by hand +doc/README.filespatched by hand +external/gpl2/groff/tmac/mdoc.local patched by hand +sys/sys/param.h patched by hand + + Welcome to 10.0_BETA!
CVS commit: [netbsd-10] src
Module Name:src Committed By: martin Date: Fri Dec 16 19:12:50 UTC 2022 Modified Files: src/doc [netbsd-10]: LAST_MINUTE README.files src/external/gpl2/groff/tmac [netbsd-10]: mdoc.local src/sys/sys [netbsd-10]: param.h Added Files: src/doc [netbsd-10]: CHANGES-10.0 Log Message: Welcome to 10.0_BETA! To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-10.0 cvs rdiff -u -r1.2 -r1.2.74.1 src/doc/LAST_MINUTE cvs rdiff -u -r1.5 -r1.5.34.1 src/doc/README.files cvs rdiff -u -r1.7 -r1.7.6.1 src/external/gpl2/groff/tmac/mdoc.local cvs rdiff -u -r1.722 -r1.722.2.1 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/tprof
Module Name:src Committed By: ryo Date: Fri Dec 16 17:38:56 UTC 2022 Modified Files: src/sys/dev/tprof: tprof.c Log Message: tprof_lock is not a spin mutex. use mutex_{enter,exit}(). oops To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/tprof/tprof.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/tprof/tprof.c diff -u src/sys/dev/tprof/tprof.c:1.21 src/sys/dev/tprof/tprof.c:1.22 --- src/sys/dev/tprof/tprof.c:1.21 Fri Dec 16 07:59:42 2022 +++ src/sys/dev/tprof/tprof.c Fri Dec 16 17:38:56 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: tprof.c,v 1.21 2022/12/16 07:59:42 ryo Exp $ */ +/* $NetBSD: tprof.c,v 1.22 2022/12/16 17:38:56 ryo Exp $ */ /*- * Copyright (c)2008,2009,2010 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tprof.c,v 1.21 2022/12/16 07:59:42 ryo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tprof.c,v 1.22 2022/12/16 17:38:56 ryo Exp $"); #include #include @@ -885,9 +885,9 @@ tprof_poll(dev_t dev, int events, struct static void filt_tprof_read_detach(struct knote *kn) { - mutex_spin_enter(_lock); + mutex_enter(_lock); selremove_knote(_selp, kn); - mutex_spin_exit(_lock); + mutex_exit(_lock); } static int @@ -896,7 +896,7 @@ filt_tprof_read_event(struct knote *kn, int rv = 0; if ((hint & NOTE_SUBMIT) == 0) - mutex_spin_enter(_lock); + mutex_enter(_lock); if (!STAILQ_EMPTY(_list)) { tprof_buf_t *buf; @@ -911,7 +911,7 @@ filt_tprof_read_event(struct knote *kn, } if ((hint & NOTE_SUBMIT) == 0) - mutex_spin_exit(_lock); + mutex_exit(_lock); return rv; } @@ -929,9 +929,9 @@ tprof_kqfilter(dev_t dev, struct knote * switch (kn->kn_filter) { case EVFILT_READ: kn->kn_fop = _read_filtops; - mutex_spin_enter(_lock); + mutex_enter(_lock); selrecord_knote(_selp, kn); - mutex_spin_exit(_lock); + mutex_exit(_lock); break; default: return EINVAL;
CVS commit: src/sys/dev/tprof
Module Name:src Committed By: ryo Date: Fri Dec 16 17:38:56 UTC 2022 Modified Files: src/sys/dev/tprof: tprof.c Log Message: tprof_lock is not a spin mutex. use mutex_{enter,exit}(). oops To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/tprof/tprof.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: martin Date: Fri Dec 16 17:35:47 UTC 2022 Modified Files: src/doc: BRANCHES CHANGES CHANGES.prev src/external/gpl2/groff/tmac: mdoc.local src/sys/sys: param.h Log Message: Welcome to 10.99.1! To generate a diff of this commit: cvs rdiff -u -r1.365 -r1.366 src/doc/BRANCHES cvs rdiff -u -r1.2940 -r1.2941 src/doc/CHANGES cvs rdiff -u -r1.165 -r1.166 src/doc/CHANGES.prev cvs rdiff -u -r1.7 -r1.8 src/external/gpl2/groff/tmac/mdoc.local cvs rdiff -u -r1.722 -r1.723 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/BRANCHES diff -u src/doc/BRANCHES:1.365 src/doc/BRANCHES:1.366 --- src/doc/BRANCHES:1.365 Mon Sep 20 02:26:05 2021 +++ src/doc/BRANCHES Fri Dec 16 17:35:42 2022 @@ -1,4 +1,4 @@ -# $NetBSD: BRANCHES,v 1.365 2021/09/20 02:26:05 thorpej Exp $ +# $NetBSD: BRANCHES,v 1.366 2022/12/16 17:35:42 martin Exp $ # # This file contains a list of branches that exist in the NetBSD CVS # tree and their current state. @@ -333,6 +333,17 @@ Scope: Entire tree. (src + xsrc) Notes: Commits restricted to Release Engineering. +Branch: netbsd-10 +Description: The NetBSD 10 release branch +Status: Active +Start Date: 2022-12-16 +End Date: +Base Tag: netbsd-10-base +Maintainer: Release Engineering +Scope: Entire tree. (src + xsrc) +Notes: + Commits restricted to Release Engineering. + # Individual developers' branches (Active/Dormant): Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2940 src/doc/CHANGES:1.2941 --- src/doc/CHANGES:1.2940 Fri Dec 16 00:05:01 2022 +++ src/doc/CHANGES Fri Dec 16 17:35:42 2022 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2940 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2941 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -23,738 +23,4 @@ # # -Changes from NetBSD 9.0 to NetBSD 10.0: - openldap: Import 2.4.48. [christos 20190808] - boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20190818] - dhcpcd(8): Import dhcpcd-8.0.3 [roy 20190821] - inet6: Fix sending RTM_MISS for unresolvable addresses and restore - ND6_LLINFO_WAITDELETE so that any send at this point can - return EHOSTDOWN to match inet behaviour. [roy 20190901] - inet: Fix sending RTM_MISS for unresolvable addresses. [roy 20190901] - dhcpcd(8): Import dhcpcd-8.0.4 [roy 20190904] - bind: Import version 9.14.5. [christos 20190905] - resolvconf(8): Import openresolv-3.9.2 [roy 20190908] - boot(8): multiboot 2 support, Xen can now boot from EFI [manu 20190913] - dhcpcd(8): Import dhcpcd-8.0.6 [roy 20190913] - kernel: Add vHCI, a driver that allows to send and receive USB - packets from userland. [maxv 20190914] - mos(4): Ported driver for MosChip MCS7730/7830/7832 USB ethernet. - [mrg 20190920] - gcc(1): Import GCC 8.3. [mrg 20191001] - libpcap: Import 1.9.1. [christos 20191001] - tcpdump(8): Import 4.9.3. [christos 20191001] - rescue(8): Moved into a separate, rescue-only set. [maya 20191001] - kqueue(2): Switch kevent udata from intptr_t void* for compatibility - with other BSDs. [kamil 20191003] - byacc: Update to 20190617. [christos 20191006] - tzdata updates from 2019a to 2019c (incl 2019b) [kre 20191008] - services(5): Update to version 2019-10-04 from IANA. - [sevan 20191009] - dhcpcd(8): Import dhcpcd-8.1.0 [roy 20191011] - OpenSSH: Import 8.1. [christos 20191012] - acpi(4): Updated ACPICA to 20190816. [christos 20191015] - sup: removed, use ftp://ftp.astron.com/pub/sup [christos 20191015] - dhcpcd(8): Import dhcpcd-8.1.1 [roy 20191016] - evbarm: Add support for the NanoPi R1 and Duo2. [bad 20191016] - bind: Import version 9.14.7. [christos 20191017] - libc: Changed the iconv(3) function signature to the POSIX variation - [kamil 20191024] - nct(4): Add Nuvoton NCT5104D GPIO driver. [ad 20191025] - vio9p(4): Add virtio-9p front-end driver. [ozaki-r 20191028] - mount_9p(8): Enable to mount a filesystem exported via virtio-9p. - [ozaki-r 20191028] - evbarm: Update TI AM335x SoC support to use FDT based configuration. - [jmcneill 20191028] - evbarm: Update TI OMAP3 SoC support to use FDT based configuration. - [jmcneill 20191101] - amd64: Add support for kCSan - Kernel Concurrency Sanitizer. - [maxv 20191105] - audioplay(1): Add support for playing IEEE float32 and float64 - RIFF WAVE files [mrg 20191109] - tmux(1): Imported 2.9a. [christos 20191112] - dhcpcd(8): Import 8.1.2. [roy 20191113] - amd64: Add support for kMSan - Kernel Memory Sanitizer. - [maxv 20191114] - kernel: Add fexecve(2) system call for executing a file from a file - descriptor, conforming to The Open Group Extended API Set 2. -
CVS commit: src
Module Name:src Committed By: martin Date: Fri Dec 16 17:35:47 UTC 2022 Modified Files: src/doc: BRANCHES CHANGES CHANGES.prev src/external/gpl2/groff/tmac: mdoc.local src/sys/sys: param.h Log Message: Welcome to 10.99.1! To generate a diff of this commit: cvs rdiff -u -r1.365 -r1.366 src/doc/BRANCHES cvs rdiff -u -r1.2940 -r1.2941 src/doc/CHANGES cvs rdiff -u -r1.165 -r1.166 src/doc/CHANGES.prev cvs rdiff -u -r1.7 -r1.8 src/external/gpl2/groff/tmac/mdoc.local cvs rdiff -u -r1.722 -r1.723 src/sys/sys/param.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes/common
Module Name:src Committed By: martin Date: Fri Dec 16 16:58:14 UTC 2022 Modified Files: src/distrib/notes/common: main Log Message: Add notes about FFS and extended attributes. To generate a diff of this commit: cvs rdiff -u -r1.569 -r1.570 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.569 src/distrib/notes/common/main:1.570 --- src/distrib/notes/common/main:1.569 Fri Apr 1 21:53:35 2022 +++ src/distrib/notes/common/main Fri Dec 16 16:58:14 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.569 2022/04/01 21:53:35 andvar Exp $ +.\" $NetBSD: main,v 1.570 2022/12/16 16:58:14 martin Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -526,6 +526,32 @@ development, and no formal or informal t this snapshot (yet). .Pp .\} \" !\n[RELEASE_BRANCH] \{ +One important new feature in this release is the support for extended +attributes and access controll lists on FFS file systems. +.Pp +For new installations the installer will default to disable this features, +so the file system is compatible with older +.Nx +releases (before 10), and allow other operating systems to mount this +file systems at least in read-only mode. +.Pp +If you want a new installed file system to support extended attributes, +change the file system type from +.Dq FFSv2 +to +.Dq FFSv2ea +in the partitioning menu. +You can also convert file systems later, using the +.Xr fsck_ffs 8 +utility. +More details are available in +.Lk https://wiki.netbsd.org/tutorials/acls_and_extended_attributes_on_ffs "this guide" . +.Pp +If you are upgrading from a version of +.Nx -current +please also check the +.Sx "Compatibility Issues With Previous NetBSD Releases" . +.PP It is impossible to completely summarize the massive development that went into the .Nx @@ -785,6 +811,20 @@ and thus all issues that are fixed by .Ic postinstall by default will be handled. .Pp +If you have ever run a version of +.Nx -current +between April 18, 2020 and September 23, 2022 (the version numbers +used in the affected time range are between 9.99.56 and 9.99.106) +your FFS file systems might have broken extended attributes stored. +.Pp +You should follow this +.Lk https://wiki.netbsd.org/features/UFS2ea/ guide +before booting the updated system multi-user for the first time. +.Pp +.Em Note that you do not need to do anything special if you never did run any affected kernel, +especially if you have never run +.Nx -current . +.Pp A number of things have been removed from the .Nx \*V release.
CVS commit: src/distrib/notes/common
Module Name:src Committed By: martin Date: Fri Dec 16 16:58:14 UTC 2022 Modified Files: src/distrib/notes/common: main Log Message: Add notes about FFS and extended attributes. To generate a diff of this commit: cvs rdiff -u -r1.569 -r1.570 src/distrib/notes/common/main Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: msaitoh Date: Fri Dec 16 08:42:55 UTC 2022 Modified Files: src/share/man/man7: sysctl.7 src/sys/kern: uipc_mbuf.c src/sys/sys: mbuf.h Log Message: Add new "kern.mbuf.nmbclusters_limit" sysctl. - Used to know the upper limit of nmbclusters. - It's read only. To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/share/man/man7/sysctl.7 cvs rdiff -u -r1.246 -r1.247 src/sys/kern/uipc_mbuf.c cvs rdiff -u -r1.236 -r1.237 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/sysctl.7 diff -u src/share/man/man7/sysctl.7:1.162 src/share/man/man7/sysctl.7:1.163 --- src/share/man/man7/sysctl.7:1.162 Mon Oct 24 01:54:19 2022 +++ src/share/man/man7/sysctl.7 Fri Dec 16 08:42:55 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.7,v 1.162 2022/10/24 01:54:19 knakahara Exp $ +.\" $NetBSD: sysctl.7,v 1.163 2022/12/16 08:42:55 msaitoh Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95 .\" -.Dd October 24, 2022 +.Dd December 16, 2022 .Dt SYSCTL 7 .Os .Sh NAME @@ -787,7 +787,7 @@ structures in the networking code, see The third level names for the mbuf variables are detailed below. The changeable column shows whether a process with appropriate privilege may change the value. -.Bl -column "kern.mbuf.nmbclusters" "integer" "Changeable" -offset indent +.Bl -column "kern.mbuf.nmbclusters_limit" "integer" "Changeable" -offset indent .It Sy Third level name Ta Sy Type Ta Sy Changeable .\" XXX Changeable? really? .It kern.mbuf.mblowat integer yes @@ -795,6 +795,7 @@ privilege may change the value. .It kern.mbuf.mcllowat integer yes .It kern.mbuf.msize integer yes .It kern.mbuf.nmbclusters integer yes +.It kern.mbuf.nmbclusters_limit integer no .El .Pp The variables are as follows: @@ -811,6 +812,8 @@ The mbuf base size. The limit on the number of mbuf clusters. The variable can only be increased, and only increased on machines with direct-mapped pool pages. +.It Li kern.mbuf.nmbclusters_limit ( Dv MBUF_NMBCLUSTERS_LIMIT ) +The limit of nmbclusters. .El .It Li kern.memlock ( Dv KERN_MEMLOCK ) Returns 1 if the Index: src/sys/kern/uipc_mbuf.c diff -u src/sys/kern/uipc_mbuf.c:1.246 src/sys/kern/uipc_mbuf.c:1.247 --- src/sys/kern/uipc_mbuf.c:1.246 Sat Apr 9 23:38:33 2022 +++ src/sys/kern/uipc_mbuf.c Fri Dec 16 08:42:55 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_mbuf.c,v 1.246 2022/04/09 23:38:33 riastradh Exp $ */ +/* $NetBSD: uipc_mbuf.c,v 1.247 2022/12/16 08:42:55 msaitoh Exp $ */ /* * Copyright (c) 1999, 2001, 2018 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.246 2022/04/09 23:38:33 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.247 2022/12/16 08:42:55 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_mbuftrace.h" @@ -289,6 +289,9 @@ sysctl_kern_mbuf(SYSCTLFN_ARGS) case MBUF_MCLLOWAT: newval = *(int*)rnode->sysctl_data; break; + case MBUF_NMBCLUSTERS_LIMIT: + newval = nmbclusters_limit(); + break; default: return EOPNOTSUPP; } @@ -487,6 +490,12 @@ sysctl_kern_mbuf_setup(void) sysctl_kern_mbuf_mowners, 0, NULL, 0, CTL_KERN, KERN_MBUF, MBUF_MOWNERS, CTL_EOL); #endif + sysctl_createv(_sysctllog, 0, NULL, NULL, + CTLFLAG_PERMANENT|CTLFLAG_READONLY, + CTLTYPE_INT, "nmbclusters_limit", + SYSCTL_DESCR("Limit of nmbclusters"), + sysctl_kern_mbuf, 0, NULL, 0, + CTL_KERN, KERN_MBUF, MBUF_NMBCLUSTERS_LIMIT, CTL_EOL); } static int Index: src/sys/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.236 src/sys/sys/mbuf.h:1.237 --- src/sys/sys/mbuf.h:1.236 Tue Nov 15 10:47:39 2022 +++ src/sys/sys/mbuf.h Fri Dec 16 08:42:55 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.236 2022/11/15 10:47:39 roy Exp $ */ +/* $NetBSD: mbuf.h,v 1.237 2022/12/16 08:42:55 msaitoh Exp $ */ /* * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -710,6 +710,7 @@ struct mbstat_cpu { #define MBUF_MCLLOWAT 5 /* int: mbuf cluster low water mark */ #define MBUF_STATS 6 /* struct: mbstat */ #define MBUF_MOWNERS 7 /* struct: m_owner[] */ +#define MBUF_NMBCLUSTERS_LIMIT 8 /* int: limit of nmbclusters */ #ifdef _KERNEL extern struct mbstat mbstat;
CVS commit: src
Module Name:src Committed By: msaitoh Date: Fri Dec 16 08:42:55 UTC 2022 Modified Files: src/share/man/man7: sysctl.7 src/sys/kern: uipc_mbuf.c src/sys/sys: mbuf.h Log Message: Add new "kern.mbuf.nmbclusters_limit" sysctl. - Used to know the upper limit of nmbclusters. - It's read only. To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/share/man/man7/sysctl.7 cvs rdiff -u -r1.246 -r1.247 src/sys/kern/uipc_mbuf.c cvs rdiff -u -r1.236 -r1.237 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/tprof
Module Name:src Committed By: ryo Date: Fri Dec 16 08:02:04 UTC 2022 Modified Files: src/usr.sbin/tprof: tprof.8 tprof.c tprof.h tprof_top.c Log Message: the "scale" option can be specified in the event name even in "tprof monitor" To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/tprof/tprof.8 cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/tprof/tprof.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/tprof/tprof.h cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/tprof/tprof_top.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/tprof/tprof.8 diff -u src/usr.sbin/tprof/tprof.8:1.23 src/usr.sbin/tprof/tprof.8:1.24 --- src/usr.sbin/tprof/tprof.8:1.23 Fri Dec 16 08:00:47 2022 +++ src/usr.sbin/tprof/tprof.8 Fri Dec 16 08:02:04 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: tprof.8,v 1.23 2022/12/16 08:00:47 ryo Exp $ +.\" $NetBSD: tprof.8,v 1.24 2022/12/16 08:02:04 ryo Exp $ .\" .\" Copyright (c)2011 YAMAMOTO Takashi, .\" All rights reserved. @@ -66,7 +66,7 @@ Valid actions are: Display a list of performance counter events available on the system. .It monitor Xo .Fl e -.Ar name[:option] +.Ar name[:option][,scale] .Op Fl e Ar ... .Op Fl o Ar outfile .Ar command @@ -83,6 +83,18 @@ specifies the source of the event; it mu .Ar k (kernel). If omitted, it is assumed that both are specified. The collected samples are written into the file +.Ar scale +specifies the ratio of the speed to the cycle counter, or the counter until +overflow. +The counter reset value on overflow used for profiling is calculated from the +speed of the cycle counter by default, but for some events this value may be +too large (counter increasing too slowly) to be sufficient for profiling. +For example, to specify an event that increases about 1000 times slower than +the cycle counter, specify +.Dq Pa -e event,1000 . +Also, if +.Dq Pa -e event,=200 +is specified, profiling is performed every time the counter is increased by 200. .Ar outfile if specified. The default is @@ -133,7 +145,7 @@ Per symbol. .It top Xo .Oo .Fl e -.Ar name[,value] +.Ar name[,scale] .Op Fl e Ar ... .Oc .Op Fl i Ar interval @@ -142,18 +154,6 @@ Per symbol. Displays profiling results in real-time. .Ar name specifies the name of the event to count. -.Ar value -specifies the ratio of the speed to the cycle counter, or the counter until -overflow. -The counter reset value on overflow used for profiling is calculated from the -speed of the cycle counter by default, but for some events this value may be -too large (counter increasing too slowly) to be sufficient for profiling. -For example, to specify an event that increases about 1000 times slower than -the cycle counter, specify -.Dq Pa -e event,1000 . -Also, if -.Dq Pa -e event,=200 -is specified, profiling is performed every time the counter is increased by 200. .Bl -tag -width XXintervalX -offset indent .It Fl i Ar interval set the update interval in seconds. The default value is 1. Index: src/usr.sbin/tprof/tprof.c diff -u src/usr.sbin/tprof/tprof.c:1.17 src/usr.sbin/tprof/tprof.c:1.18 --- src/usr.sbin/tprof/tprof.c:1.17 Mon Dec 5 05:02:45 2022 +++ src/usr.sbin/tprof/tprof.c Fri Dec 16 08:02:04 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: tprof.c,v 1.17 2022/12/05 05:02:45 ryo Exp $ */ +/* $NetBSD: tprof.c,v 1.18 2022/12/16 08:02:04 ryo Exp $ */ /* * Copyright (c) 2018 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ #include #ifndef lint -__RCSID("$NetBSD: tprof.c,v 1.17 2022/12/05 05:02:45 ryo Exp $"); +__RCSID("$NetBSD: tprof.c,v 1.18 2022/12/16 08:02:04 ryo Exp $"); #endif /* not lint */ #include @@ -264,6 +264,97 @@ tprof_list(int argc, char **argv) tprof_event_list(); } +int +tprof_parse_event(tprof_param_t *param, const char *str, uint32_t flags, +const char **eventnamep, char **errmsgp) +{ + double d; + uint64_t n; + int error = 0; + char *p, *event = NULL, *opt = NULL, *scale = NULL; + bool allow_option, allow_scale; + static char errmsgbuf[128]; + + allow_option = flags & TPROF_PARSE_EVENT_F_ALLOWOPTION; + allow_scale = flags & TPROF_PARSE_EVENT_F_ALLOWSCALE; + + p = estrdup(str); + event = p; + if (allow_option) { + opt = strchr(p, ':'); + if (opt != NULL) { + *opt++ = '\0'; + p = opt; + } + } + if (allow_scale) { + scale = strchr(p, ','); + if (scale != NULL) + *scale++ = '\0'; + } + + tprof_event_lookup(event, param); + + if (opt != NULL) { + while (*opt != '\0') { + switch (*opt) { + case 'u': +param->p_flags |= TPROF_PARAM_USER; +break; + case 'k': +param->p_flags |= TPROF_PARAM_KERN; +break; + default: +error = -1; +snprintf(errmsgbuf, sizeof(errmsgbuf), +"invalid option: '%c'", *opt); +goto done; + } + } + } else if (allow_option) { + param->p_flags |= TPROF_PARAM_USER; + param->p_flags |= TPROF_PARAM_KERN; + } + + if (scale != NULL) { + if (*scale == '=') { + scale++; + n =
CVS commit: src/usr.sbin/tprof
Module Name:src Committed By: ryo Date: Fri Dec 16 08:02:04 UTC 2022 Modified Files: src/usr.sbin/tprof: tprof.8 tprof.c tprof.h tprof_top.c Log Message: the "scale" option can be specified in the event name even in "tprof monitor" To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/tprof/tprof.8 cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/tprof/tprof.c cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/tprof/tprof.h cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/tprof/tprof_top.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/tprof
Module Name:src Committed By: ryo Date: Fri Dec 16 08:00:48 UTC 2022 Modified Files: src/usr.sbin/tprof: tprof.8 tprof_top.c Log Message: - added 'c' command to tprof-top to show/hide event counter. - column widths were not calculated correctly and sometimes displayed incorrectly. - use putp() for terminfo str. - fix build error with llvm. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/tprof/tprof.8 cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/tprof/tprof_top.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/tprof/tprof.8 diff -u src/usr.sbin/tprof/tprof.8:1.22 src/usr.sbin/tprof/tprof.8:1.23 --- src/usr.sbin/tprof/tprof.8:1.22 Fri Dec 9 01:59:51 2022 +++ src/usr.sbin/tprof/tprof.8 Fri Dec 16 08:00:47 2022 @@ -1,4 +1,4 @@ -.\" $NetBSD: tprof.8,v 1.22 2022/12/09 01:59:51 ryo Exp $ +.\" $NetBSD: tprof.8,v 1.23 2022/12/16 08:00:47 ryo Exp $ .\" .\" Copyright (c)2011 YAMAMOTO Takashi, .\" All rights reserved. @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 9, 2022 +.Dd December 16, 2022 .Dt TPROF 8 .Os .Sh NAME @@ -175,6 +175,8 @@ These commands are currently recognized: .Bl -tag -width XXcommandsX -offset indent .It Ic a toggle accumurative mode. +.It Ic c +shows/hides the event counters. .It Ic q quit .Nm . Index: src/usr.sbin/tprof/tprof_top.c diff -u src/usr.sbin/tprof/tprof_top.c:1.5 src/usr.sbin/tprof/tprof_top.c:1.6 --- src/usr.sbin/tprof/tprof_top.c:1.5 Fri Dec 9 02:19:07 2022 +++ src/usr.sbin/tprof/tprof_top.c Fri Dec 16 08:00:47 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: tprof_top.c,v 1.5 2022/12/09 02:19:07 ryo Exp $ */ +/* $NetBSD: tprof_top.c,v 1.6 2022/12/16 08:00:47 ryo Exp $ */ /*- * Copyright (c) 2022 Ryo Shimizu @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: tprof_top.c,v 1.5 2022/12/09 02:19:07 ryo Exp $"); +__RCSID("$NetBSD: tprof_top.c,v 1.6 2022/12/16 08:00:47 ryo Exp $"); #endif /* not lint */ #include @@ -154,10 +154,10 @@ reset_cursor_pos(void) /* cursor_up * n */ if ((p = tigetstr("cuu")) != NULL) { - printf("%s", tparm(p, win.ws_row - 1, 0, 0, 0, 0, 0, 0, 0, 0)); + putp(tparm(p, win.ws_row - 1, 0, 0, 0, 0, 0, 0, 0, 0)); } else if ((p = tigetstr("cuu1")) != NULL) { for (i = win.ws_row - 1; i > 0; i--) - printf("%s", p); + putp(p); } } @@ -170,7 +170,7 @@ clr_to_eol(void) return; if ((p = tigetstr("el")) != NULL) - printf("%s", p); + putp(p); } /* newline, and clearing to end of line if needed */ @@ -288,7 +288,7 @@ sigalrm_handler(int signo) sigalrm = 1; } -static void +__dead static void die(int signo) { tty_restore(); @@ -297,7 +297,7 @@ die(int signo) exit(EXIT_SUCCESS); } -static void __dead +__dead static void die_errc(int status, int code, const char *fmt, ...) { va_list ap; @@ -676,20 +676,21 @@ show_count_per_event(int *lim) do_redraw = true; } } - for (i = 0; i < nevent; i++) { - for (n = 0; n < ncpu; n++) { - l = snprintf(buf, sizeof(buf), "%"PRIu64, - sample_n_per_event_cpu[opt_mode][nevent * n + i]); - if (sample_cpu_width[n] < (u_int)l) { -sample_cpu_width[n] = l; -do_redraw = true; - } + for (n = 0; n < ncpu; n++) { + uint64_t sum = 0; + for (i = 0; i < nevent; i++) + sum += sample_n_per_event_cpu[opt_mode][nevent * n + i]; + l = snprintf(buf, sizeof(buf), "%"PRIu64, sum); + if (sample_cpu_width[n] < (u_int)l) { + sample_cpu_width[n] = l; + do_redraw = true; } } if (do_redraw) { - lim_printf(lim, " Rate %*s Eventname ", - sample_event_width, "Sample#"); + lim_printf(lim, " Rate %*s %-*s", + sample_event_width, "Sample#", + SYMBOL_LEN, "Eventname"); for (n = 0; n < ncpu; n++) { snprintf(buf, sizeof(buf), "CPU%d", n); lim_printf(lim, " %*s", sample_cpu_width[n], buf); @@ -796,8 +797,9 @@ sample_show(void) lim_newline(); if (do_redraw) { - lim_printf(, " Rate %*s Symbol ", - sample_event_width, "Sample#"); + lim_printf(, " Rate %*s %-*s", + sample_event_width, "Sample#", + SYMBOL_LEN, "Symbol"); for (n = 0; n < ncpu; n++) { snprintf(namebuf, sizeof(namebuf), "CPU%d", n); lim_printf(, " %*s", sample_cpu_width[n], namebuf); @@ -944,7 +946,7 @@ parse_event_scale(tprof_param_t *param, return 0; } -void +__dead void tprof_top(int argc, char **argv) { tprof_param_t params[TPROF_MAXCOUNTERS]; @@ -1046,12 +1048,12 @@ tprof_top(int argc, char **argv) printf("collecting samples..."); fflush(stdout); - tprof_bufsize = sizeof(tprof_sample_t) * 8192; + tprof_bufsize = sizeof(tprof_sample_t) * 1024 * 32; tprof_buf = emalloc(tprof_bufsize); do { bool force_update = false; - for (;;) { + while (sigalrm == 0 && !force_update) { fd_set r; int nfound; char c; @@ -1081,6 +1083,12
CVS commit: src/usr.sbin/tprof
Module Name:src Committed By: ryo Date: Fri Dec 16 08:00:48 UTC 2022 Modified Files: src/usr.sbin/tprof: tprof.8 tprof_top.c Log Message: - added 'c' command to tprof-top to show/hide event counter. - column widths were not calculated correctly and sometimes displayed incorrectly. - use putp() for terminfo str. - fix build error with llvm. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/tprof/tprof.8 cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/tprof/tprof_top.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.