Re: pdaemon locking tweak

2022-08-29 Thread Jonathan Gray
On Mon, Aug 29, 2022 at 01:46:20PM +0200, Martin Pieuchot wrote: > Diff below refactors the pdaemon's locking by introducing a new *trylock() > function for a given page. This is shamelessly stolen from NetBSD. > > This is part of my ongoing effort to untangle the locks used by the page > daemon.

Re: [RFC] acpi: add acpitimer_delay(), acpihpet_delay()

2022-08-29 Thread Scott Cheloha
> On Aug 29, 2022, at 22:54, Jonathan Gray wrote: > > On Mon, Aug 29, 2022 at 12:02:42PM -0500, Scott Cheloha wrote: >> If hv_delay() never causes a vm exit, but tsc_delay() *might* cause a >> vm exit, and both have microsecond or better resolution, then >> hv_delay() is the preferable delay(9)

Re: [RFC] acpi: add acpitimer_delay(), acpihpet_delay()

2022-08-29 Thread Jonathan Gray
On Mon, Aug 29, 2022 at 12:02:42PM -0500, Scott Cheloha wrote: > If hv_delay() never causes a vm exit, but tsc_delay() *might* cause a > vm exit, and both have microsecond or better resolution, then > hv_delay() is the preferable delay(9) implementation where it is > available because vm exits have

Re: refactor pcb lookup

2022-08-29 Thread Vitaliy Makkoveev
Looks good by me. > On 29 Aug 2022, at 14:15, Alexander Bluhm wrote: > > Anyone? > > On Sat, Aug 20, 2022 at 03:24:28PM +0200, Alexander Bluhm wrote: >> Hi, >> >> Can we rename the the function in_pcbhashlookup() to in_pcblookup()? >> Then we have in_pcblookup() and in_pcblookup_listen() as pu

Re: udp pcb mutex

2022-08-29 Thread Vitaliy Makkoveev
> On 29 Aug 2022, at 20:34, Alexander Bluhm wrote: > > Hi, > > The diff below is needed to protect the receive socket buffer in > UDP input with per PCB mutex. > > With that, parallel UDP input and soreceive can be activated. There > are still issues with socket splicing and maybe pipex. So I

Re: Race in disk_attach_callback?

2022-08-29 Thread Miod Vallat
> What's the status on this diff? I'm waiting for review from at least one of the softraid suspects prior to putting this in, in case there are further cinematics to address.

Re: all architectures: put clockframe definition in frame.h?

2022-08-29 Thread Scott Cheloha
On Mon, Aug 29, 2022 at 06:50:08PM +0200, Mark Kettenis wrote: > > Date: Mon, 29 Aug 2022 11:33:19 -0500 > > From: Scott Cheloha > > > > On Fri, Aug 19, 2022 at 01:24:47PM +0200, Mark Kettenis wrote: > > > > > > This is one of those annoying corners where there is too much > > > unecessary MD var

Re: Can't use hostname in hostctl command.

2022-08-29 Thread Masato Asou
> Hi! > > I can use ip and can'5 use hostname in hostctl command as blow: > > $ hostctl guestinfo.ip > 172.16.100.131 > $ hostctl guestinfo.hostname > hostctl: ioctl: Invalid argument I can read it after writing to hostname. However, I do not know how to read this in HOSTMACHINE. -- ASOU Masato

Re: softraid raid1c keydisk cosmetic fix

2022-08-29 Thread Klemens Nanni
On Sat Aug 13, 2022 at 12:39 AM +04, Stefan Sperling wrote: > Use raid1c-specific meta-data while looking for a key disk that > belongs to a RAID 1C volume. > > By dumb luck this is only a cosmetic issue, because struct layout > happens to put the field in the same place. Good catch. OK kn One su

Continuous USB transfers

2022-08-29 Thread Marcus Glocker
xhci(4) and ehci(4) are scheduling continuous isoc transfers. For that we have implemented a kind of workaround, which checks whether usbd_start_next() is calling in between and try to start an transfer which is still in progress. NetBSD has introduced a variable called 'serialise' for the pipe,

Re: bgpd remove aspath cache for more speed

2022-08-29 Thread Claudio Jeker
On Mon, Aug 29, 2022 at 07:44:33PM +0200, Theo Buehler wrote: > On Mon, Aug 29, 2022 at 07:28:58PM +0200, Claudio Jeker wrote: > > This diff removes the aspath cache. I tried replacing it with an RB tree > > but it still consumes a lot of CPU cycles for little gain. So instead just > > copy the asp

snmpd(8): Minor logging cleanup

2022-08-29 Thread Martijn van Duren
Apparently I mistyped one AgentX as Agentx, and when moving sess_id to uint32_t (in an early draft) I forgot to adjust the %d in two places. OK? martijn@ Index: application_agentx.c === RCS file: /cvs/src/usr.sbin/snmpd/application_

Re: snmpd(8): make sure oidbuf is properly initialized on overlapping regions

2022-08-29 Thread Theo Buehler
On Mon, Aug 29, 2022 at 07:32:25PM +0200, Martijn van Duren wrote: > I think the subject speaks for itself. > > Not a really big problem, since non of the available software that we > currently have in base/ports have overlapping regions, but definitely > worth fixing. > > OK? ok tb

Re: snmpd(8): Allow overlapping region from same backend

2022-08-29 Thread Theo Buehler
On Mon, Aug 29, 2022 at 07:39:35PM +0200, Martijn van Duren wrote: > Right now we don't allow overlapping regions when the subtree flag is > set, . However I don't see a reason why a single backend can't > make an overlapping region with itself. > > I would also like to use this feature when movin

Re: [matth...@openbsd.org: Re: xlock don't take my password anymore]

2022-08-29 Thread Matthieu Herrb
On Mon, Aug 29, 2022 at 09:08:26AM +0200, Greg Steuck wrote: > Greg Steuck writes: > > Matthieu> + authok = priv_pw_check(user, style, pass); > > I suspect your original patch may have swapped the arguments. The > password should go before style. Oops you're right thanks. > > What do y

Re: bgpd remove aspath cache for more speed

2022-08-29 Thread Theo Buehler
On Mon, Aug 29, 2022 at 07:28:58PM +0200, Claudio Jeker wrote: > This diff removes the aspath cache. I tried replacing it with an RB tree > but it still consumes a lot of CPU cycles for little gain. So instead just > copy the aspath for all rde_aspath structs. It will use more memory but in > most

Re: udp pcb mutex

2022-08-29 Thread Claudio Jeker
On Mon, Aug 29, 2022 at 07:34:14PM +0200, Alexander Bluhm wrote: > Hi, > > The diff below is needed to protect the receive socket buffer in > UDP input with per PCB mutex. > > With that, parallel UDP input and soreceive can be activated. There > are still issues with socket splicing and maybe pi

snmpd(8): Allow overlapping region from same backend

2022-08-29 Thread Martijn van Duren
Right now we don't allow overlapping regions when the subtree flag is set, . However I don't see a reason why a single backend can't make an overlapping region with itself. I would also like to use this feature when moving mib.c code into an libagentx based backend. OK? martijn@ Index: applicat

udp pcb mutex

2022-08-29 Thread Alexander Bluhm
Hi, The diff below is needed to protect the receive socket buffer in UDP input with per PCB mutex. With that, parallel UDP input and soreceive can be activated. There are still issues with socket splicing and maybe pipex. So I will not switch to shared lock in receive path soon. But I want to

snmpd(8): make sure oidbuf is properly initialized on overlapping regions

2022-08-29 Thread Martijn van Duren
I think the subject speaks for itself. Not a really big problem, since non of the available software that we currently have in base/ports have overlapping regions, but definitely worth fixing. OK? martijn@ Index: application.c ===

bgpd remove aspath cache for more speed

2022-08-29 Thread Claudio Jeker
This diff removes the aspath cache. I tried replacing it with an RB tree but it still consumes a lot of CPU cycles for little gain. So instead just copy the aspath for all rde_aspath structs. It will use more memory but in most cases the amount is in the 20-30% order. This also includes a lot of f

Re: [RFC] acpi: add acpitimer_delay(), acpihpet_delay()

2022-08-29 Thread Scott Cheloha
On Thu, Aug 25, 2022 at 03:57:48PM +1000, Jonathan Gray wrote: > On Wed, Aug 24, 2022 at 11:05:30PM -0500, Scott Cheloha wrote: > > On Wed, Aug 24, 2022 at 05:51:14PM +1000, Jonathan Gray wrote: > > > On Tue, Aug 23, 2022 at 12:20:39PM -0500, Scott Cheloha wrote: > > > > > Hyper-V generation 1 VMs

Re: all architectures: put clockframe definition in frame.h?

2022-08-29 Thread Mark Kettenis
> Date: Mon, 29 Aug 2022 11:33:19 -0500 > From: Scott Cheloha > > On Fri, Aug 19, 2022 at 01:24:47PM +0200, Mark Kettenis wrote: > > > > This is one of those annoying corners where there is too much > > unecessary MD variation. Currently travelling without a laptop, so I > > can't easily check th

Re: all architectures: put clockframe definition in frame.h?

2022-08-29 Thread Scott Cheloha
On Fri, Aug 19, 2022 at 01:24:47PM +0200, Mark Kettenis wrote: > > This is one of those annoying corners where there is too much > unecessary MD variation. Currently travelling without a laptop, so I > can't easily check the tree. But one note I wanted to make is that the > definition of struct clo

Re: unbound update

2022-08-29 Thread Stuart Henderson
On 2022/08/26 17:47, void wrote: > On Wed, Aug 24, 2022 at 03:03:01PM +0100, Stuart Henderson wrote: > > Anyone want to test this? > > > > Any OKs? > > Hello, > > Seemed to patch OK and built OK with a -current made yesterday, on aarch64. > > I'm a newbie at building/patching openbsd, so if the

Re: bgpd switch rde_aspath to RB tree

2022-08-29 Thread Claudio Jeker
On Mon, Aug 29, 2022 at 05:49:06PM +0200, Theo Buehler wrote: > On Mon, Aug 29, 2022 at 05:28:50PM +0200, Claudio Jeker wrote: > > This is the 2nd RB tree transformation instead of the hash table. > > > > The rde.c part will probably conflict with the change for communities. > > Apart from an unc

Re: bgpd switch communities to RB tree

2022-08-29 Thread Claudio Jeker
On Mon, Aug 29, 2022 at 05:45:58PM +0200, Claudio Jeker wrote: > On Mon, Aug 29, 2022 at 05:36:49PM +0200, Theo Buehler wrote: > > On Mon, Aug 29, 2022 at 05:05:59PM +0200, Claudio Jeker wrote: > > > The hash table for communities is not great. Instead of implementing > > > dynamic hash resize use

Re: bgpd switch rde_aspath to RB tree

2022-08-29 Thread Theo Buehler
On Mon, Aug 29, 2022 at 05:28:50PM +0200, Claudio Jeker wrote: > This is the 2nd RB tree transformation instead of the hash table. > > The rde.c part will probably conflict with the change for communities. Apart from an unchecked RB_INSERT() this also looks fine.

Re: bgpd switch communities to RB tree

2022-08-29 Thread Claudio Jeker
On Mon, Aug 29, 2022 at 05:36:49PM +0200, Theo Buehler wrote: > On Mon, Aug 29, 2022 at 05:05:59PM +0200, Claudio Jeker wrote: > > The hash table for communities is not great. Instead of implementing > > dynamic hash resize use a RB tree. Also drop the hash calculation and > > just use memcmp() for

Re: bgpd switch communities to RB tree

2022-08-29 Thread Theo Buehler
On Mon, Aug 29, 2022 at 05:05:59PM +0200, Claudio Jeker wrote: > The hash table for communities is not great. Instead of implementing > dynamic hash resize use a RB tree. Also drop the hash calculation and > just use memcmp() for now. My non scientific test seems to indicate that > the overhead of

bgpd switch rde_aspath to RB tree

2022-08-29 Thread Claudio Jeker
This is the 2nd RB tree transformation instead of the hash table. The rde.c part will probably conflict with the change for communities. -- :wq Claudio ? obj Index: rde.c === RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v retrieving revis

bgpd switch communities to RB tree

2022-08-29 Thread Claudio Jeker
The hash table for communities is not great. Instead of implementing dynamic hash resize use a RB tree. Also drop the hash calculation and just use memcmp() for now. My non scientific test seems to indicate that the overhead of SipHash is about the same as the memcmp(). -- :wq Claudio Index: bgp

Re: bgpd/bgpctl report number of pending updates/withdraws

2022-08-29 Thread Claudio Jeker
On Mon, Aug 29, 2022 at 04:47:51PM +0200, Theo Buehler wrote: > On Mon, Aug 29, 2022 at 04:41:56PM +0200, Claudio Jeker wrote: > > The RDE has a queue of pending updates and withdraws. Those are already > > counted but not shown. On big setups it may be helpful to know about the > > queue progress.

Re: bgpd/bgpctl report number of pending updates/withdraws

2022-08-29 Thread Theo Buehler
On Mon, Aug 29, 2022 at 04:41:56PM +0200, Claudio Jeker wrote: > The RDE has a queue of pending updates and withdraws. Those are already > counted but not shown. On big setups it may be helpful to know about the > queue progress. I'm not sure "withdraws" is correct English. Shouldn't that be "with

bgpd/bgpctl report number of pending updates/withdraws

2022-08-29 Thread Claudio Jeker
The RDE has a queue of pending updates and withdraws. Those are already counted but not shown. On big setups it may be helpful to know about the queue progress. -- :wq Claudio Index: bgpctl/output.c === RCS file: /cvs/src/usr.sbin/b

Re: uvmpd_dropswap()

2022-08-29 Thread Mike Larkin
On Mon, Aug 29, 2022 at 01:58:38PM +0200, Martin Pieuchot wrote: > Small refactoring to introduce uvmpd_dropswap(). This will make an > upcoming rewrite of the pdaemon smaller & easier to review :o) > > ok? > reads ok to me. ok mlarkin > Index: uvm/uvm_pdaemon.c > ===

bgpd speedup diff

2022-08-29 Thread Claudio Jeker
On large bgpd instances the hash tables used for rde_aspath, aspath and communities get overloaded to a point that aspath_get() consumes a large amount of CPU time. This diff improves the situation by a) using a RB tree for rde_aspath and communities and b) dropping the hash table for aspath all t

Re: static inline, not inline static

2022-08-29 Thread Anders Andersson
On Mon, Aug 29, 2022 at 2:01 AM Philip Guenther wrote: > > On Sun, Aug 28, 2022 at 2:11 PM Anders Andersson wrote: >> >> On Sun, Aug 28, 2022 at 3:15 PM Jonathan Gray wrote: >> > >> > diff --git lib/libc/locale/wctoint.h lib/libc/locale/wctoint.h >> > index ea50c5ae1b6..14c7f0c466d 100644 >> > -

uvmpd_dropswap()

2022-08-29 Thread Martin Pieuchot
Small refactoring to introduce uvmpd_dropswap(). This will make an upcoming rewrite of the pdaemon smaller & easier to review :o) ok? Index: uvm/uvm_pdaemon.c === RCS file: /cvs/src/sys/uvm/uvm_pdaemon.c,v retrieving revision 1.102

Re: [PATCH] Correctly (per POSIX) round up df usage percentage

2022-08-29 Thread наб
On Mon, Aug 29, 2022 at 05:10:10AM -0600, Theo de Raadt wrote: > I would really prefer if this did not need floating point. In that case, how about this scissor-patch? It has the added benefit of removing the existing floating-point usage. Best, -- >8 -- Subject: [PATCH] Correctly (per POSIX) ro

pdaemon locking tweak

2022-08-29 Thread Martin Pieuchot
Diff below refactors the pdaemon's locking by introducing a new *trylock() function for a given page. This is shamelessly stolen from NetBSD. This is part of my ongoing effort to untangle the locks used by the page daemon. ok? Index: uvm//uvm_pdaemon.c ==

Re: unbound update

2022-08-29 Thread Theo Buehler
On Wed, Aug 24, 2022 at 03:03:01PM +0100, Stuart Henderson wrote: > Anyone want to test this? > > Any OKs? Works fine here and nothing jumps out at me in the diff. ok tb

Re: refactor pcb lookup

2022-08-29 Thread Alexander Bluhm
Anyone? On Sat, Aug 20, 2022 at 03:24:28PM +0200, Alexander Bluhm wrote: > Hi, > > Can we rename the the function in_pcbhashlookup() to in_pcblookup()? > Then we have in_pcblookup() and in_pcblookup_listen() as public PCB > interface. Using a hash table is only an implementation detail. > > For

boot_*.8: reference installboot.8, rectify FFS note on sparc64

2022-08-29 Thread Klemens Nanni
On sparc64, installboot does not deal with any file system; its -p is a NOOP and the old sys/arch/sparc64/installboot/ never prepared a file system, either, according to CVS history. Remove this single misleading mention alltogether and rely on the now consistently cross-linked MI installboot(8) f

Re: [PATCH] Correctly (per POSIX) round up df usage percentage

2022-08-29 Thread Theo de Raadt
I would really prefer if this did not need floating point. >From owner-tech+m90...@openbsd.org Mon Aug 29 03:52:24 2022 >Delivered-To: dera...@cvs.openbsd.org >Date: Mon, 29 Aug 2022 11:47:16 +0200 >From: =?utf-8?B?0L3QsNCx?= >To: Stuart Henderson >Cc: tech@openbsd.org >Subject: Re: [PATCH] Corr

Re: remove net/ofp.h? switch(4) remnant

2022-08-29 Thread Stuart Henderson
It could move to a private header in tcpdump though. -- Sent from a phone, apologies for poor formatting. On 29 August 2022 08:03:30 Klemens Nanni wrote: Scratch that, tcpdump uses it.

Re: [PATCH] Correctly (per POSIX) round up df usage percentage

2022-08-29 Thread наб
Hi! On Sat, Aug 27, 2022 at 05:20:00PM +0100, Stuart Henderson wrote: > df is used on the ramdisk, so this would need testing there (at least on > the tighter media on some archs). > > at least one other ramdisk binary does pull in libm so the overall size > increase might not be terrible, but de

move PRU_SENDOOB request to (*pru_sendoob)()

2022-08-29 Thread Vitaliy Makkoveev
PRU_SENDOOB request always consumes passed `top' and `control' mbufs. We don't want to have dummy m_freem(9) handlers for all protocols, so we release passed mbufs in the pru_sendoob() EOPNOTSUPP error path. Also we had the `control' mbuf(9) leak in the tcp(4) PRU_SENDOOB error path, which was fix

Can't use hostname in hostctl command.

2022-08-29 Thread Masato Asou
Hi! I can use ip and can'5 use hostname in hostctl command as blow: $ hostctl guestinfo.ip 172.16.100.131 $ hostctl guestinfo.hostname hostctl: ioctl: Invalid argument man hostctl has the forrowing description: EXAMPLES The vmt(4) driver provides access to the ``guestinfo'' informati

Re: [matth...@openbsd.org: Re: xlock don't take my password anymore]

2022-08-29 Thread Greg Steuck
Greg Steuck writes: Matthieu> + authok = priv_pw_check(user, style, pass); I suspect your original patch may have swapped the arguments. The password should go before style. What do you thing about this patch (tested locally, but I don't have style): diff --git a/app/xlockmore/xlock/pa

Re: remove net/ofp.h? switch(4) remnant

2022-08-29 Thread Jonathan Gray
On Mon, Aug 29, 2022 at 06:55:53AM +, Klemens Nanni wrote: > This header came to be when switch(4) was imported in 2016. > Today nothing includes it and we don't have any other OpenFlow software > in base. > > Does it still serve any purpose? > https://codesearch.debian.net/search?q=ofp.h+file

Re: remove net/ofp.h? switch(4) remnant

2022-08-29 Thread Klemens Nanni
Scratch that, tcpdump uses it.