Re: Anonymous vnodes?

2023-06-27 Thread Christoph Badura
On Tue, Jun 27, 2023 at 11:30:24AM -0400, Mouse wrote: > It's a normal state to be in. But, as I read it, the post was asking > for a way to reach that state _without_ passing through a "has a name > in some directory" state; it's not clear to me whether that's possible > in general (ie, without

Re: 9.1: boot-time delay?

2021-05-25 Thread Christoph Badura
On Wed, May 26, 2021 at 05:02:52AM +1000, matthew green wrote: > > > +options HZ=8000 > this can become a problem due to integer division. > > any number of ticks less than hz (8000) will be rounded > down to 0 in a number of places now, where as before it > was only less than 100. i've seen

Re: 9.1: boot-time delay? [WORKAROUND FOUND]

2021-05-25 Thread Christoph Badura
On Tue, May 25, 2021 at 04:04:56PM -0400, Mouse wrote: > > I suppose it's not possible to configure ahcisata in the BIOS on the > > long-delay machines? > > Thank you very much! Yes. That is possible - and it fixes the delay. > I would not have thought to look for that; I would not have

Re: adding linux syscall fallocate

2019-11-19 Thread Christoph Badura
On Mon, Nov 18, 2019 at 02:26:17PM -0800, Jason Thorpe wrote: > > On Nov 18, 2019, at 1:13 PM, Mouse wrote: > > All you need is a second magic block number. Block number zero is > > already reserved for holes. Making, say, block number 1, or -1, or > > some such, reserved to represent

Re: more fexecve questions

2019-09-10 Thread Christoph Badura
On Tue, Sep 10, 2019 at 09:45:50PM +0200, Christoph Badura wrote: > This is to catch the following case(s): The file might have the > following permissions "--x--x--x" (or equivalent where the open()ing > process doesn't have read or write permission).

Re: more fexecve questions

2019-09-10 Thread Christoph Badura
On Tue, Sep 10, 2019 at 07:31:47PM +0200, Kamil Rytarowski wrote: > On 10.09.2019 18:21, David Holland wrote: > > > O_EXEC should be tunable in runtime, with: > > > fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_EXEC); > > Why? You can't do that with O_WRITE. > I don't know. I was looking for a

Re: EVFILT_USER?

2019-02-17 Thread Christoph Badura
On Sun, Feb 17, 2019 at 01:48:52PM -0800, Jason Thorpe wrote: > > On Feb 17, 2019, at 1:32 PM, co...@sdf.org wrote: > > the linux equivalent code seems to be using futex_wait/wake. > > I’m working on integrating a new Linux-compatible futex > implementation written by Taylor (that led me down the

Re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c

2019-01-22 Thread Christoph Badura
On Mon, Jan 21, 2019 at 11:44:04PM +0100, Christoph Badura wrote: > On Tue, Jan 22, 2019 at 08:32:48AM +1100, matthew green wrote: > > > > @@ -472,6 +472,9 @@ > > > > const char *bootname = device_xname(bdv); > > > > size_t len = strlen(bootn

Re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c

2019-01-21 Thread Christoph Badura
On Tue, Jan 22, 2019 at 08:32:48AM +1100, matthew green wrote: > > > @@ -472,6 +472,9 @@ > > > const char *bootname = device_xname(bdv); > > > size_t len = strlen(bootname); > > > > > > + if (bdv == NULL) > > > + return 0; > > > + > > > > This looked suspicious, even before I read

Re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c

2019-01-21 Thread Christoph Badura
On Mon, Jan 21, 2019 at 04:24:49PM -0500, Greg Troxel wrote: > Separetaly from debug code being careful, if it's a rule that bdv can't > be NULL, it's just as well to put in a KASSERT. Then we'll find out > where that isn't true and can fix it. I must not be getting something. If

Re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c

2019-01-21 Thread Christoph Badura
On Mon, Jan 21, 2019 at 06:36:37PM +0100, Christoph Badura wrote: > I think the following is better. Compile-tested only for both #ifdef > conditions, but I think that is OK. Ugh. I forgot to put a comment on that function. How about this: /* * Provide a wrapper around rf_contai

Re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c

2019-01-21 Thread Christoph Badura
On Mon, Jan 21, 2019 at 10:42:10AM -0500, Greg Troxel wrote: > Christoph Badura writes: > > Index: rf_netbsdkintf.c > > === > > RCS file: /cvsroot/src/sys/dev/raidframe/rf_netbsdkintf.c,v > > retrieving

patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c

2019-01-20 Thread Christoph Badura
Here is some instrumentation I found useful during my recent debugging. If there are no objections, I'd like to commit soon. The change to rf_containsroot() simplifies the second DPRINTF that I added. Index: rf_netbsdkintf.c === RCS

Re: XEN3_DOM0 cpu_bootconf() and bootdev=xxx failure

2019-01-20 Thread Christoph Badura
On Sun, Jan 13, 2019 at 08:45:31AM -, Michael van Elst wrote: > b...@bsd.de (Christoph Badura) writes: > >> So, assuming 'raid0' has a component 'dk0' which is based on 'wd0', it > >> should work to specify 'wd0' as bootdev. > > >That does work. However, that

Re: XEN3_DOM0 cpu_bootconf() and bootdev=xxx failure

2019-01-10 Thread Christoph Badura
On Tue, Jan 08, 2019 at 09:28:07PM -, Michael van Elst wrote: > b...@bsd.de (Christoph Badura) writes: > > >With "raidctl -A softroot raid0" the XEN3_DOM0 kernel does not detect > >raid0 as root device. > > raidframe checks if the system was booted from o

XEN3_DOM0 cpu_bootconf() and bootdev=xxx failure

2019-01-08 Thread Christoph Badura
I have a Xen server with two disk, gpt partitioned, raidframe mirrors on the dk(4) devices. That system boots off an USB flash key. With "raidctl -A softroot raid0" the XEN3_DOM0 kernel does not detect raid0 as root device. It also doesn't detect raid0 as root device when the dom0 kernel is

Re: struct file at VFS level (round 1.5)

2016-05-04 Thread Christoph Badura
On Tue, May 03, 2016 at 12:20:41PM +, Emmanuel Dreyfus wrote: > Well, I need you to explain me what happens in sys_flock() then. > Is it a bug? > error = VOP_ADVLOCK(vp, fp, F_UNLCK, , F_FLOCK); > > fp is struct file. Same thing happens in open_setfp() and closef()

Re: struct file at VFS level (round 1.5)

2016-05-03 Thread Christoph Badura
On Tue, May 03, 2016 at 08:20:02AM +, Emmanuel Dreyfus wrote: > On Tue, May 03, 2016 at 09:30:22AM +0200, Christoph Badura wrote: > > - for the write case > >off = current_file_offset > >VOP_ADVLOCK(F_WRLCK, off, size_of_write) > >VOP_WRITE(...) >

Re: struct file at VFS level (round 1.5)

2016-05-03 Thread Christoph Badura
On Tue, May 03, 2016 at 05:33:34AM +0200, Emmanuel Dreyfus wrote: > Christoph Badura <b...@bsd.de> wrote: > > > Mandatory file locking simply is a SMOP for the kernel to add a flag to a > > vnode that indicates whether mandatory locking is in effect and adding

Re: struct file at VFS level (round 1.5)

2016-05-02 Thread Christoph Badura
On Mon, May 02, 2016 at 07:15:12AM +, Emmanuel Dreyfus wrote: > NetBSD filesystems implement advisory locks, where the only place the > filesystem actually check locks as VOP_ADVLOCK. Any other operation > performed on a file region locked by someone else succeeds: the locks > are only

Re: Interrupt time inflation on Xen

2016-04-15 Thread Christoph Badura
On Fri, Apr 15, 2016 at 12:52:36AM -0400, Thor Lancelot Simon wrote: > It definitely does for me (that same dd, but from /dev/rsd0d, goes to > 60% "Interrupt" time on pkgbuild). I can't help noticing everyone who > doesn't see the problem is using wd, while I see it with ciss or arcmsr. I didn't

how to properly enable modules for pci devices?

2014-07-20 Thread Christoph Badura
I want to enable the build of ubsec(4) as a module in sys/modules/Makefile for all arches that have PCI bus and a reference to ubsec in some kernel config file. Reading sys/modules/Makefile I found little guidance. I get the impression that this hasn't been tried before. I've come up with the

Re: ~5 percent kernel performance loss in the last 3 weeks

2013-12-04 Thread Christoph Badura
On Tue, Nov 19, 2013 at 04:02:51PM +0100, Christoph Badura wrote: After updating my -current kernel from 6.99.24 to 6.99.27 so I could commit my ubsec(4) changes I noticed that under 6.99.27 I get between 3 and 8 percent less throughput on accelerated crypto ops. I was able to pin this down

Re: pulse-per-second API status

2013-11-19 Thread Christoph Badura
On Fri, Nov 01, 2013 at 01:06:07PM -0400, Greg Troxel wrote: This patch to netbsd-5 adds pps support to ucom(4), which should enable pps on all usb serial chips that report modem control changes. [...] I am inclined to port this change to -current, compile-test it, and commit it.

Re: posix_fallocate

2013-11-19 Thread Christoph Badura
On Mon, Nov 18, 2013 at 12:31:41PM +1100, matthew green wrote: i would buy this argument if mmap()ing a large sparse file and filling it up randomly (but with relatively large chunks at a time) did not lead to severely fragmented files that can take 10x to read, vs one written with plain

~5 percent kernel performance loss in the last 3 weeks

2013-11-19 Thread Christoph Badura
After updating my -current kernel from 6.99.24 to 6.99.27 so I could commit my ubsec(4) changes I noticed that under 6.99.27 I get between 3 and 8 percent less throughput on accelerated crypto ops. Note that I am using the exact same ubsec(4) code[1] with both kernels, so I think it is unlikely a

bus_dmamap_destroy no longer callable from interrupt context?

2013-11-15 Thread Christoph Badura
While trying to port BCM586x support I discovered that I get the following panic under -current. The same code works fine on -6. What gives? panic: kernel diagnostic assertion ((!cpu_intr_p() !cpu_softintr_p()) || (pc-pc_pool.pr_ipl != IPL_NONE || cold || panicstr != NULL) failed: file

Re: bus_dmamap_destroy no longer callable from interrupt context?

2013-11-15 Thread Christoph Badura
On Fri, Nov 15, 2013 at 08:57:26AM -0800, Matt Thomas wrote: it's intentional. dmamap create/destroy can't be done from interrupt because they allocate memory. besides mbufs, memory can't be allocated. I don't agree with the softintr restriction (where else can drivers allocate). Bummer. It

Re: Lua in-kernel (lbuf library)

2013-10-20 Thread Christoph Badura
On Tue, Oct 15, 2013 at 06:01:29PM -0300, Lourival Vieira Neto wrote: Also, having to switch mentally between zero-based arrays in the kernel C code and 1-based arrays in the Lua code make my head ache. It's something that doesn't bug me so much.. But, if necessary it could be changed to

Re: Lua in-kernel (lbuf library)

2013-10-14 Thread Christoph Badura
First, I find the usage of the buf terminology confusing. In kernel context I associate buf with the file system buffe cache buf structure. Packet buffers a called mbufs. I would appreciate it if the terminology was consistent with the kernel or at least not confusing. Also, having to switch

Re: secmodel_register(9) API

2011-12-06 Thread Christoph Badura
On Mon, Dec 05, 2011 at 07:33:35PM +0100, Jean-Yves Migeon wrote: On Mon, 5 Dec 2011 16:22:33 +0100, Christoph Badura wrote: That is by design. The idea behind splitting the decision process into separate secmodels is to decouple the models and the decision making. I can't see how

Re: secmodel_register(9) API

2011-12-05 Thread Christoph Badura
On Mon, Dec 05, 2011 at 02:35:53PM -0500, Elad Efrat wrote: What the new API allows is interaction between secmodels that are built by people who are not part of NetBSD and don't want their secmodel to become part of NetBSD but do want to take advantage of features in secmodels provided by