Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Jonathan Matthew
On Sat, Mar 19, 2016 at 01:53:07PM +0100, Martin Pieuchot wrote: > Applications using multiple threads often call sched_yield(2) to > indicate that one of the threads cannot make any progress because > it is waiting for a resource held by another one. > > One example of this scenario is the _spinl

Re: kern_sched.c: unused functions

2016-03-19 Thread Michael McConville
Michal Mazurek wrote: > On 17:19:39, 2.03.16, Martin Natano wrote: > > On Wed, Mar 02, 2016 at 05:07:21PM +0100, Michal Mazurek wrote: > > > kern_sched.c: > > > - remove unused functions > > > - mark static functions as static > > > > Functions shouldn't be static in the kernel. "In userland, > >

Re: Update `ticks' in the right place

2016-03-19 Thread Mike Belopuhov
On Wed, Mar 16, 2016 at 14:42 +0900, Masao Uebayashi wrote: > This doesn't use atomic operation, because: > > - hardclock() is the only writer > - Clock interrupt doesn't run simultaneously > - Reading int should be atomic on all architectures > Well, in reality both the new location and timeou

stty header cleanup

2016-03-19 Thread Edgar Pettijohn
Index: cchar.c === RCS file: /cvs/src/bin/stty/cchar.c,v retrieving revision 1.11 diff -u -p -u -r1.11 cchar.c --- cchar.c27 Oct 2009 23:59:22 -1.11 +++ cchar.c16 Mar 2016 23:53:58 - @@ -30,6 +30,7 @@ * SUCH DAMA

A patch for allowing IPv6-only or IPv4-only bridges

2016-03-19 Thread Momtchil Momtchev
Hello there, Here is my patch that adds support for creating IPv6-only or IPv4-only bridges. This is different from simply blocking one of the protocols via PF - it allows you to create a setup where IPv4 is routed and IPv6 is bridged (or vice versa). Both of them being filtered by th

Re: make armv5te the gcc default

2016-03-19 Thread Patrick Wildt
On Sat, Mar 19, 2016 at 09:56:48AM +1100, Jonathan Gray wrote: > Instead of armv4 tuned for strongarm switch to an armv5te default to > allow additional instructions to be used (clz etc). > > armish and zaurus are both xscale (armv5te with additional extensions). > > The builtin gcc defines chang

nam2blk cleanup

2016-03-19 Thread Artturi Alm
Hi, related to past cleanup for some of the sys/arch/x/x/conf.c. -Artturi Index: sys/arch/alpha/alpha/autoconf.c === RCS file: /cvs/src/sys/arch/alpha/alpha/autoconf.c,v retrieving revision 1.35 diff -u -p -r1.35 autoconf.c --- sys

cron funcs.h patch

2016-03-19 Thread Edgar Pettijohn
I guess I could have organized alphabetically. Still can if preferred. Index: funcs.h === RCS file: /cvs/src/usr.sbin/cron/funcs.h,v retrieving revision 1.28 diff -u -p -u -r1.28 funcs.h --- funcs.h14 Nov 2015 13:09:14 -

Re: New scheduler for OpenBSD

2016-03-19 Thread Juan Francisco Cantero Hurtado
On Tue, Mar 15, 2016 at 03:05:47PM +0100, Michal Mazurek wrote: > On 16:28:33, 14.03.16, Martin Pieuchot wrote: > > > The number of calls to yield() dropped to 4,576. > > > > This is really similar to what I observed with Firefox and Chrome. > > > > > This is where I get stuck, I don't know how t

Re: tedu empty tcsh files in /etc

2016-03-19 Thread Alexander Hall
On Sun, Mar 20, 2016 at 01:33:06AM +0100, Alexander Hall wrote: > Hi, > > As far as I can tell, there is no point in having these files lying > around in /etc as they are not needed by tcsh. They're all comments > and don't even hold an example. > > Thus, remove them and make them optional in /e

Re: arm: remove sa1/ixp12x0

2016-03-19 Thread Patrick Wildt
On Sat, Mar 19, 2016 at 09:27:19AM +1100, Jonathan Gray wrote: > On Fri, Mar 18, 2016 at 04:43:08PM +0100, Patrick Wildt wrote: > > Hi, > > > > next up on the list is the StrongARM and IXP12x0. > > > > This diff removes most, but keeps the SA1100 headers, > > which are still used by zaurus. > >

tedu empty tcsh files in /etc

2016-03-19 Thread Alexander Hall
Hi, As far as I can tell, there is no point in having these files lying around in /etc as they are not needed by tcsh. They're all comments and don't even hold an example. Thus, remove them and make them optional in /etc/mtree/special. Objections from tcsh users? OK? /Alexander Index: Makef

stop urndis(4) dmesg spam

2016-03-19 Thread Stefan Sperling
While tethering to my phone on a train, I'm seeing a lot of these lines in dmesg: urndis0: usb errors on rx: IOERROR urndis0: usb error on tx: IOERROR So many in fact that if I run 'dmesg' that's all I see, over and over. However, network mostly works, and works particularly well given the right

Re: New scheduler for OpenBSD

2016-03-19 Thread Michael McConville
Bob Beck wrote: > this is cool .. but > > I would be interested in someone comparing server workloads, as > opposed to interactive GUI response, using this. > > I wouldn't be surprised that inspiriation from BFS would produce > better interactive response, my bigger concern would be does this > a

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Miod Vallat
> p_p->ps_threads (and p_thr_link) can only be modified by threads in > this process. The result is that the test here can't claim the > process is single-threaded when it's multi-threaded. (An "is MT" > result can go stale if there's no locking and the only other thread in > the process exits,

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Juan Francisco Cantero Hurtado
On Sat, Mar 19, 2016 at 01:53:07PM +0100, Martin Pieuchot wrote: > Applications using multiple threads often call sched_yield(2) to > indicate that one of the threads cannot make any progress because > it is waiting for a resource held by another one. > > One example of this scenario is the _spinl

Re: stty header cleanup

2016-03-19 Thread Michael McConville
One correction: Edgar Pettijohn wrote: > Index: cchar.c > === > RCS file: /cvs/src/bin/stty/cchar.c,v > retrieving revision 1.11 > diff -u -p -u -r1.11 cchar.c > --- cchar.c27 Oct 2009 23:59:22 -1.11 > +++ cchar.c16 Ma

uvm amap: Simplify amap traversal in amap_swap_off

2016-03-19 Thread Stefan Kempf
The recent uvm commits fixed hangs because machines went out of memory because of using too much space for amap slots. It's possible to shrink memory requirements for amaps even more, but the current code needs some simplifications first. So here's another cleanup diff. There'll be one or two more

Re: New scheduler for OpenBSD

2016-03-19 Thread Bob Beck
this is cool .. but I would be interested in someone comparing server workloads, as opposed to interactive GUI response, using this. I wouldn't be surprised that inspiriation from BFS would produce better interactive response, my bigger concern would be does this adversely impact how we deal with

Re: CPUID in amd64/i386 boot code

2016-03-19 Thread Masao Uebayashi
This is the intended use, avoid busy-polling of BIOS PC console if running on HV. Avoid 100% CPU usage at boot prompt on hypervisors. Originally I unconditionally reverted the polling part, which was introduced only for Intel Mac Mini. After brief discussion with mikeb@, I decided to leave that

tcp syn cache random reseed

2016-03-19 Thread Alexander Bluhm
Hi, To prevent attacks on the hash buckets of the syn cache, our TCP stack reseeds the hash function every time the cache is empty. Unfortunatly the attacker can prevent the reseeding by sending unanswered SYN packes periodically. I fix this by having an active syn cache that gets new entries and

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Bob
I'm also interested in hearing from more people using multi-threaded applications. I applied the patch to my old core duo p7570 running CURRENT/amd64. Firefox is more responsive and youtube videos, previously impossible to watch, run smoothly, even in full screen. Sumultaneously did some phot

Re: fan control on macppc G5 smu

2016-03-19 Thread Olivier Cherrier
On Fri, Mar 18, 2016 at 01:02:43PM +0100, m...@openbsd.org wrote: > > Could you test the diff below and tell me if it also helps? It is > adapted from a submission from Dominic Marks: > https://marc.info/?l=openbsd-ppc&m=142836014007157&w=2 Indeed it does more or less the same thing. So,

Re: CPUID in amd64/i386 boot code

2016-03-19 Thread Mike Larkin
On Thu, Mar 17, 2016 at 03:31:45PM +0900, Masao Uebayashi wrote: > On Wed, Mar 16, 2016 at 11:26:39PM -0700, Mike Larkin wrote: > > On Thu, Mar 17, 2016 at 03:15:07PM +0900, Masao Uebayashi wrote: > > > This is the intended use, avoid busy-polling of BIOS PC console if > > > running on HV. Avoid 1

Re: Implement delay() using TSC

2016-03-19 Thread Masao Uebayashi
On Wed, Mar 16, 2016 at 11:49:32PM -0700, Mike Larkin wrote: > On Thu, Mar 17, 2016 at 03:38:20PM +0900, Masao Uebayashi wrote: > > On Wed, Mar 16, 2016 at 11:25:11PM -0700, Mike Larkin wrote: > > > On Thu, Mar 17, 2016 at 09:44:22AM +0900, Masao Uebayashi wrote: > > > > Implement delay() using TSC

Implement delay() using TSC

2016-03-19 Thread Masao Uebayashi
Implement delay() using TSC - Calculate delay using 64-bit RDTSC instruction - Enable tsc_delay() as delay(9) backend - Use tsc_delay() only when TSC is invariant - Configure tsc_delay() after primary CPU is identified - Assume all CPUs are identical diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/

axen improvements

2016-03-19 Thread Brandon Mercer
I've recently acquired a usb3.0->gigabit ethernet adapter. It did not attach reliably, pass traffic reliably, and it made my machine panic when I unplugged it. Takahiro HAYASHI suggested that the reset code doesn't do anything and that it should initialize the chip. Indeed that does seem to help. I

Re: Implement delay() using TSC

2016-03-19 Thread Mike Larkin
On Thu, Mar 17, 2016 at 03:38:20PM +0900, Masao Uebayashi wrote: > On Wed, Mar 16, 2016 at 11:25:11PM -0700, Mike Larkin wrote: > > On Thu, Mar 17, 2016 at 09:44:22AM +0900, Masao Uebayashi wrote: > > > Implement delay() using TSC > > > > > > - Calculate delay using 64-bit RDTSC instruction > > >

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Christian Schulte
s/approves/improves/g

Rename the global variable ``ticks''

2016-03-19 Thread Martin Pieuchot
``ticks'' is in my opinion a really badly named global variable. But we all know that finding names is hard ;) Since its popularity seems to be really high lately, I'd suggest to rename it. I chose ``hcticks'' for "hardclock ticks". I believe this would help auditing the possible existing and/o

Re: Implement delay() using TSC

2016-03-19 Thread Mike Larkin
On Thu, Mar 17, 2016 at 04:03:25PM +0900, Masao Uebayashi wrote: > On Wed, Mar 16, 2016 at 11:49:32PM -0700, Mike Larkin wrote: > > On Thu, Mar 17, 2016 at 03:38:20PM +0900, Masao Uebayashi wrote: > > > On Wed, Mar 16, 2016 at 11:25:11PM -0700, Mike Larkin wrote: > > > > On Thu, Mar 17, 2016 at 09:

Re: New scheduler for OpenBSD

2016-03-19 Thread Chris Cappuccio
Michal Mazurek [akf...@jasminek.net] wrote: > On 16:28:33, 14.03.16, Martin Pieuchot wrote: > > > The number of calls to yield() dropped to 4,576. > > > > This is really similar to what I observed with Firefox and Chrome. > > > > > This is where I get stuck, I don't know how to replace the call t

Octeon II usb

2016-03-19 Thread Jonathan Matthew
I've had this sitting around for a while and I figure it's time to get it in the tree. Octeon II sensibly got rid of the DWC USB controller and put in ehci and ohci compliant controllers instead, so all we need to do here is set up a few registers in the usb controller interface and attach the sta

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Christian Schulte
The java based Netbeans IDE performs a lot of things in the background using threads like indexing sources, downloading artifacts, unpacking archives, compiling sources in addition to the normal java background tasks like JIT compiling. This change approves UI responsiveness on my T60.

Re: stty header cleanup

2016-03-19 Thread Michael McConville
ok mmcc@ Edgar Pettijohn wrote: > Index: cchar.c > === > RCS file: /cvs/src/bin/stty/cchar.c,v > retrieving revision 1.11 > diff -u -p -u -r1.11 cchar.c > --- cchar.c27 Oct 2009 23:59:22 -1.11 > +++ cchar.c16 Mar 2016

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Daniel Bolgheroni
On Sat, Mar 19, 2016 at 01:53:07PM +0100, Martin Pieuchot wrote: > I experimented with various values for "p_priority" and this one is > the one that generates fewer # IPIs when watching a HD video on firefox. > Because yes, with this diff, now I can. YouTube on Firefox on ThinkPad T420: It's def

Re: ed header cleanup

2016-03-19 Thread Michael McConville
ok mmcc@ Edgar Pettijohn wrote: > Index: buf.c > === > RCS file: /cvs/src/bin/ed/buf.c,v > retrieving revision 1.22 > diff -u -p -u -r1.22 buf.c > --- buf.c9 Oct 2015 19:47:02 -1.22 > +++ buf.c16 Mar 2016 23:23:53 -000

IB700 watchdog

2016-03-19 Thread Masao Uebayashi
This tiny driver is only meant for a backup watchdog configuration on QEMU, whose ICH watchdog, supported by ichwdt(4), seems broken. ib700wdt(4) supports only 0-30 second timeouts but in practice it should be good enough. diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC ind

CPUID in amd64/i386 boot code

2016-03-19 Thread Masao Uebayashi
Factor out CPUID code in mdrandom(), invoke it once, then save the result. I'll use it to switch behavior depending on HV or not. efiboot is not tested. Comments? >From 104cb04bbbd0f7e40758938cc3103b2370a2285c Mon Sep 17 00:00:00 2001 From: Masao Uebayashi Date: Thu, 10 Mar 2016 21:03:07 +0900

Re: New scheduler for OpenBSD

2016-03-19 Thread Chris Cappuccio
Bob Beck [b...@openbsd.org] wrote: > this is cool .. but > > I would be interested in someone comparing server workloads, as > opposed to interactive GUI response, using this. > > I wouldn't be surprised that inspiriation from BFS would produce > better interactive response, my bigger concern > w

Re: New scheduler for OpenBSD

2016-03-19 Thread Alexandre Ratchov
On Tue, Mar 15, 2016 at 03:05:47PM +0100, Michal Mazurek wrote: > > Please test, and let me know if the performance of something else > degrades. > With your diff firefox consumes twice less cpu (watched the same video with and without the diff). This suggests firefox spins somewhere and your d

Re: IB700 watchdog

2016-03-19 Thread Mike Larkin
On Fri, Mar 18, 2016 at 08:18:30PM +0100, Mark Kettenis wrote: > > Date: Thu, 17 Mar 2016 14:28:04 +0900 > > From: Masao Uebayashi > > > > This tiny driver is only meant for a backup watchdog configuration on > > QEMU, whose ICH watchdog, supported by ichwdt(4), seems broken. > > > > ib700wdt(4)

Re: IB700 watchdog

2016-03-19 Thread Martin Pieuchot
On 17/03/16(Thu) 14:28, Masao Uebayashi wrote: > This tiny driver is only meant for a backup watchdog configuration on > QEMU, whose ICH watchdog, supported by ichwdt(4), seems broken. What's the problem? Is it in our code or in QEMU?

Re: New scheduler for OpenBSD

2016-03-19 Thread Michael McConville
Edd Barrett wrote: > On Sat, Mar 19, 2016 at 09:06:26AM +0100, Alexandre Ratchov wrote: > > The browsers problems seem caused by the way pthreads behave; > > browsers appear to spin. With the proposed scheduler they spin > > less. But the real question is why they spin at all? > > Inspired by th

uvm amap: Remove redundant check

2016-03-19 Thread Stefan Kempf
The compiler is also smart enough to recognize that this is redundant. The resulting code on amd64 is basically equivalent (slightly different register allocation and instruction scheduling). ok? Index: uvm/uvm_amap.c === RCS file: /

Re: CPUID in amd64/i386 boot code

2016-03-19 Thread Mike Larkin
On Thu, Mar 17, 2016 at 03:15:07PM +0900, Masao Uebayashi wrote: > This is the intended use, avoid busy-polling of BIOS PC console if > running on HV. Avoid 100% CPU usage at boot prompt on hypervisors. > Which hypervisors have you tested this on? -ml > Originally I unconditionally reverted th

Re: add EdgeRouter Pro to www/octeon.html

2016-03-19 Thread Jasper Lievisse Adriaanse
On Fri, Mar 18, 2016 at 08:44:11AM +0100, Marcus MERIGHI wrote: > Hello, > > "The patch seems to work fine on an EdgeRouter Pro. > OK visa@" > (http://marc.info/?l=openbsd-tech&m=145822792814191) > > EdgeRouter Pro is not on octeon.html, put it there? > > Bye, Marcus Last time I checked the ethe

Reduce local ``ticks'' declarations

2016-03-19 Thread Martin Pieuchot
A recent diff from dlg@ made me looks at where the global variable ``ticks'' is used and how. I find this *really* difficult because there's a lot of noise. In order to reduce the noise and help for this audit here's a first diff. It renames all the local variables from ``ticks'' to ``nticks'' wh

Re: arm: only (re)set specific bits in sctlr

2016-03-19 Thread Patrick Wildt
On Sun, Mar 20, 2016 at 03:36:45AM +1100, Jonathan Gray wrote: > On Wed, Mar 02, 2016 at 03:31:57PM +0100, Patrick Wildt wrote: > > Hi, > > > > currently we have a rather big list of bits that we remove and set in > > the System Control Register. Those differ per processor, so not every > > armv7

Re: multitouch support in wsmouse 1/3

2016-03-19 Thread Ulf Brosziewski
It isn't possible to leave all of the existing code intact, at least not for touchpads, which form the most complex and critical case here. Either all of them run with the modified synaptics driver, or they don't. I don't see a reasonable solution in between (wsconscomm.c might become a little mon

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Philip Guenther
On Sat, Mar 19, 2016 at 9:18 AM, Miod Vallat wrote: > >> I'd like to know if dereferencing ``p_p'' is safe without holding the >> KERNEL_LOCK. > > SCHED_LOCK is enough to access p_p->ps_threads, Uh, not quite. p_p itself is immutable for the life of a thread and can be dereferenced without locks

Re: CPUID in amd64/i386 boot code

2016-03-19 Thread Mike Belopuhov
On Wed, Mar 16, 2016 at 23:47 -0700, Mike Larkin wrote: > On Thu, Mar 17, 2016 at 03:31:45PM +0900, Masao Uebayashi wrote: > > On Wed, Mar 16, 2016 at 11:26:39PM -0700, Mike Larkin wrote: > > > On Thu, Mar 17, 2016 at 03:15:07PM +0900, Masao Uebayashi wrote: > > > > This is the intended use, avoid

Re: New scheduler for OpenBSD

2016-03-19 Thread Norman Golisz
Hi Michal, On Fri Mar 18 2016 10:03, Edd Barrett wrote: > On Thu, Mar 17, 2016 at 09:26:08PM +0100, Henrik Friedrichsen wrote: > > On Tue, Mar 15, 2016 at 03:05:47PM +0100, Michal Mazurek wrote: > > > Chrome still isn't smooth. > > > > > > Please test, and let me know if the performance of someth

Remove build machinery for non-UTF-8 charsets

2016-03-19 Thread Jeremie Courreges-Anglas
What's the plan regarding this? libc and locale(1) don't use LOCALE_CHARSETS anymore, we only support UTF-8 and I doubt that we'll change our mind about that. The diff below removes support for non-UTF-8 LC_CTYPE files. It survived make release. Thoughts? Index: lib/libc/locale/Makefile.inc =

Re: SSLv3 and Internet Printing Protocol requirements problem

2016-03-19 Thread Chris Bennett
On Fri, Mar 18, 2016 at 08:31:36AM -0600, Bob Beck wrote: > > But it officially requires support for IPP version 1.0, which used > > SSLv3. > > I assume that there are printers, perhaps many were sold, which did use > > version 1.0. That version used SSLv3 for encrypted communication. Which > > is

Re: arm: only (re)set specific bits in sctlr

2016-03-19 Thread Jonathan Gray
On Wed, Mar 02, 2016 at 03:31:57PM +0100, Patrick Wildt wrote: > Hi, > > currently we have a rather big list of bits that we remove and set in > the System Control Register. Those differ per processor, so not every > armv7/armv8 processor has the same bits, although they tend to be > rather simil

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Miod Vallat
> I'd like to know if dereferencing ``p_p'' is safe without holding the > KERNEL_LOCK. SCHED_LOCK is enough to access p_p->ps_threads, The construct used to decide whether the process is multi-threaded already appears twice in sys/kern¸ and your diff adds a third instance. It is probably worth t

Re: fan control on macppc G5 smu

2016-03-19 Thread Sevan Janiyan
On 18/03/2016 12:02, Martin Pieuchot wrote: Could you test the diff below and tell me if it also helps? It is adapted from a submission from Dominic Marks: https://marc.info/?l=openbsd-ppc&m=142836014007157&w=2 It definitely helps here. As the kernel works its way through probing vario

Insufficient checks in IPv6 socket binding and UDP IPv6 option processing missing in OpenSBD_5_9 cvs tree

2016-03-19 Thread Ian Mcwilliam
http://ftp.openbsd.org/pub/OpenBSD/patches/5.9/common/002_in6bind.patch.sig 002: SECURITY FIX: March 16, 2016 All architectures Insufficient checks in IPv6 socket binding and UDP IPv6 option processing allow a local user to send UDP packets with a source (IPv6 address + port) already reserved

Re: SSLv3 and Internet Printing Protocol requirements problem

2016-03-19 Thread Bob Beck
> But it officially requires support for IPP version 1.0, which used > SSLv3. > I assume that there are printers, perhaps many were sold, which did use > version 1.0. That version used SSLv3 for encrypted communication. Which > is now gone. Almost certainly. > > How should we deal with this probl

Re: dwctwo(4) matching on Octeon

2016-03-19 Thread Masao Uebayashi
OK uebayasi@ On Sat, Mar 19, 2016 at 02:51:56PM +, Visa Hankala wrote: > dwctwo(4) should be attached only on those Octeon models that have the > DWC2 controller. The list below is not complete but it covers every > model that has any chance of working with cnmac(4). > > OK? > > Index: arch/

Re: New scheduler for OpenBSD

2016-03-19 Thread lists
Fri, 18 Mar 2016 13:04:49 -0600 Theo de Raadt > > So I'm skeptical about this BFS scheduler. Don't get me wrong; I do > > think the scheduler needs attention. But I'm not sure a scheduler > > designed for interactive desktop use is the best option for OpenBSD. > > I'm willing to be proven wrong.

dwctwo(4) matching on Octeon

2016-03-19 Thread Visa Hankala
dwctwo(4) should be attached only on those Octeon models that have the DWC2 controller. The list below is not complete but it covers every model that has any chance of working with cnmac(4). OK? Index: arch/octeon/dev/octdwctwo.c ===

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Todd Mortimer
On Sat, Mar 19, 2016 at 01:53:07PM +0100, Martin Pieuchot wrote: > I experimented with various values for "p_priority" and this one is > the one that generates fewer # IPIs when watching a HD video on firefox. > Because yes, with this diff, now I can. Same result here: Video in firefox plays nice

rtwn chip id

2016-03-19 Thread Stefan Sperling
The common part of rtwn(4) needs help from attachment drivers to determine the chip type. The PCI/USB driver parts must detect the chip type based on PCI/USB vendor and device IDs. There seems to be no other way of doing this. Even the Linux vendor driver does it this way. The common part is still

Re: Scheduler hack for multi-threaded processes

2016-03-19 Thread Edd Barrett
On Sat, Mar 19, 2016 at 01:53:07PM +0100, Martin Pieuchot wrote: > I experimented with various values for "p_priority" and this one is > the one that generates fewer # IPIs when watching a HD video on firefox. > Because yes, with this diff, now I can. Works well here in firefox too. Will run thi

vnet(4) memory leak

2016-03-19 Thread Stefan Sperling
A sparc64 machine of mine crashes every few weeks because the kernel runs out of memory. The crash usually happens in a malloc call in the vnet(4) ioctl code path. I have a cronjob which downs/up vnet interfaces in case they get stuck in OACTIVE (another bug which, AFAIK, is not solved yet). So th

Re: New scheduler for OpenBSD

2016-03-19 Thread Theo de Raadt
> So I'm skeptical about this BFS scheduler. Don't get me wrong; I do > think the scheduler needs attention. But I'm not sure a scheduler > designed for interactive desktop use is the best option for OpenBSD. > I'm willing to be proven wrong. But that means we need careful > benchmarking on a wi

Re: New scheduler for OpenBSD

2016-03-19 Thread Edd Barrett
On Thu, Mar 17, 2016 at 09:26:08PM +0100, Henrik Friedrichsen wrote: > On Tue, Mar 15, 2016 at 03:05:47PM +0100, Michal Mazurek wrote: > > Chrome still isn't smooth. > > > > Please test, and let me know if the performance of something else > > degrades. > > While Chrome may not be 100% smooth yet

Re: CPUID in amd64/i386 boot code

2016-03-19 Thread Theo de Raadt
> Factor out CPUID code in mdrandom(), invoke it once, then save the > result. I'll use it to switch behavior depending on HV or not. > > efiboot is not tested. > > Comments? I don't understand the purpose of the refactoring.

Scheduler hack for multi-threaded processes

2016-03-19 Thread Martin Pieuchot
Applications using multiple threads often call sched_yield(2) to indicate that one of the threads cannot make any progress because it is waiting for a resource held by another one. One example of this scenario is the _spinlock() implementation of our librthread. But if you look on https://codesea

Re: New scheduler for OpenBSD

2016-03-19 Thread Edd Barrett
On Sat, Mar 19, 2016 at 09:06:26AM +0100, Alexandre Ratchov wrote: > The browsers problems seem caused by the way pthreads behave; > browsers appear to spin. With the proposed scheduler they spin > less. But the real question is why they spin at all? Inspired by this comment, I set out to see if

Re: Octeon II usb

2016-03-19 Thread Visa Hankala
On Thu, Mar 17, 2016 at 11:51:19AM +1000, Jonathan Matthew wrote: > I've had this sitting around for a while and I figure it's time to get it in > the tree. Octeon II sensibly got rid of the DWC USB controller and put in > ehci > and ohci compliant controllers instead, so all we need to do here i

Re: Rename the global variable ``ticks''

2016-03-19 Thread Mark Kettenis
> Date: Thu, 17 Mar 2016 21:02:03 +0100 > From: Martin Pieuchot > > ``ticks'' is in my opinion a really badly named global variable. But we > all know that finding names is hard ;) > > Since its popularity seems to be really high lately, I'd suggest to > rename it. I chose ``hcticks'' for "har

Re: CPUID in amd64/i386 boot code

2016-03-19 Thread Theo de Raadt
The process I see here the submission of 2 seperate diffs to the bootblocks, requiring people to take two steps. Then readers of tech@ will realize that the proposition is to test their bootblocks right away, many will balk. The diffs also do not come with a report as to what machines were te

Re: fan control on macppc G5 smu

2016-03-19 Thread Martin Pieuchot
On 31/01/16(Sun) 23:47, Olivier Cherrier wrote: > Hi, > > It may not be the proper solution to control the fans on macppc smu (G5) > but the following patch allows me to work with my iMac G5 without > losing my hearing capacity ... > > > > $ sysctl hw.sensors > hw.sensors.smu0.temp0=44.72

Re: kern_sched.c: unused functions

2016-03-19 Thread Mike Belopuhov
On Wed, Mar 16, 2016 at 22:18 -0400, Michael McConville wrote: > Michal Mazurek wrote: > > On 17:19:39, 2.03.16, Martin Natano wrote: > > > On Wed, Mar 02, 2016 at 05:07:21PM +0100, Michal Mazurek wrote: > > > > kern_sched.c: > > > > - remove unused functions > > > > - mark static functions as sta

csh header cleanup

2016-03-19 Thread Edgar Pettijohn
Index: alloc.c === RCS file: /cvs/src/bin/csh/alloc.c,v retrieving revision 1.17 diff -u -p -u -r1.17 alloc.c --- alloc.c26 Dec 2015 13:48:38 -1.17 +++ alloc.c16 Mar 2016 22:47:56 - @@ -30,12 +30,18 @@ * SUCH DAM

Re: New scheduler for OpenBSD

2016-03-19 Thread Mike Belopuhov
On 18 March 2016 at 18:02, Michal Mazurek wrote: > On 09:22:18, 18.03.16, Chris Cappuccio wrote: >> These are really rough observations. This box spawns lots of dirty >> perl processes and also lots of fping processes for monitoring. > > The next step I had planned was related to juggling processe

Re: kern_sched.c: unused functions

2016-03-19 Thread Mark Kettenis
> Date: Wed, 16 Mar 2016 22:18:41 -0400 > From: Michael McConville > > Michal Mazurek wrote: > > On 17:19:39, 2.03.16, Martin Natano wrote: > > > On Wed, Mar 02, 2016 at 05:07:21PM +0100, Michal Mazurek wrote: > > > > kern_sched.c: > > > > - remove unused functions > > > > - mark static function

Re: A patch for allowing IPv6-only or IPv4-only bridges

2016-03-19 Thread Martin Pieuchot
On 16/03/16(Wed) 20:54, Momtchil Momtchev wrote: > [..] > Here is my patch that adds support for creating IPv6-only or IPv4-only > bridges. This is different from simply blocking one of the protocols via PF > - it allows you to create a setup where IPv4 is routed and IPv6 is bridged > (or vice

Re: New scheduler for OpenBSD

2016-03-19 Thread Karel Gardas
On Fri, Mar 18, 2016 at 6:02 PM, Michal Mazurek wrote: > BFS has one shared queue for all CPUs, maybe there is a very good reason > for that, we'll see. Michal, first of all congrats to optimistic results in interactive workloads. Honestly I'm a little bit worried about your attempts since I thi

Re: multitouch support in wsmouse 1/3

2016-03-19 Thread Ulf Brosziewski
There are whitespace errors in the diffs. In case anyone wants to test them, please use the new versions in the attachment. On 03/13/2016 06:37 PM, Ulf Brosziewski wrote: The diffs below are a rewrite of the input-processing part of wsmouse. It adds support for multitouch input. [...] mtsuppo

puc(4): [WIP] TXIC TX382B UART controller support

2016-03-19 Thread SASANO Takayoshi
Hello, Recently I bought a cheap PCIe UART adapter. It uses ASMedia ASM1083 PCIe-PCI bridge and TXIC TX382B UART controller. There is no details/datasheets about TX382B, but a Chinese seller saids that it is similar to WCH351Q (aka WinChipHead's CH351Q). [1] So I add new entry to pucdata.c like C

Re: New scheduler for OpenBSD

2016-03-19 Thread Michal Mazurek
On 09:22:18, 18.03.16, Chris Cappuccio wrote: > These are really rough observations. This box spawns lots of dirty > perl processes and also lots of fping processes for monitoring. The next step I had planned was related to juggling processes between cpus. Right now that code is untouched, other t

ed header cleanup

2016-03-19 Thread Edgar Pettijohn
Index: buf.c === RCS file: /cvs/src/bin/ed/buf.c,v retrieving revision 1.22 diff -u -p -u -r1.22 buf.c --- buf.c9 Oct 2015 19:47:02 -1.22 +++ buf.c16 Mar 2016 23:23:53 - @@ -30,6 +30,15 @@ */ #include +#includ

Re: New scheduler for OpenBSD

2016-03-19 Thread Martin Pieuchot
On 18/03/16(Fri) 13:04, Theo de Raadt wrote: > > So I'm skeptical about this BFS scheduler. Don't get me wrong; I do > > think the scheduler needs attention. But I'm not sure a scheduler > > designed for interactive desktop use is the best option for OpenBSD. > > I'm willing to be proven wrong.

Re: Octeon II usb

2016-03-19 Thread Jonathan Matthew
On Thu, Mar 17, 2016 at 11:43:03AM +0900, Masao Uebayashi wrote: > A bit surprised that code does more than I imagined by reading your > description :) but it looks very good to me! > > A few comments: > > - `struct octuctl_softc' is not using `sc_ehci' and `sc_ohci'? These were leftovers from w

Re: Octeon II usb

2016-03-19 Thread Masao Uebayashi
A bit surprised that code does more than I imagined by reading your description :) but it looks very good to me! A few comments: - `struct octuctl_softc' is not using `sc_ehci' and `sc_ohci'? - Some magic numbers in `octuctl_clock_setup' could be #define'ed I've just bought EdgeRouter Pro. Hope

Re: puc(4): [WIP] TXIC TX382B UART controller support

2016-03-19 Thread SASANO Takayoshi
Hello, The diff is committed (ok by deraadt@), and I am testing the behavior of TX382B's FIFO. > Here is a dmesg. > > ppb1 at pci1 dev 0 function 0 "ASMedia ASM1083/1085 PCIE-PCI" rev 0x04 > pci2 at ppb1 bus 2 > puc0 at pci2 dev 0 function 0 "TXIC TX382B" rev 0x10: ports: 2 com > com4 at

SSLv3 and Internet Printing Protocol requirements problem

2016-03-19 Thread Chris Bennett
Apologies for my disappearance for a while but I have been brutally sick. Fine now. IPP is now using version 1.1 and new products also. But it officially requires support for IPP version 1.0, which used SSLv3. I assume that there are printers, perhaps many were sold, which did use version 1.0. Th

Re: Rename the global variable ``ticks''

2016-03-19 Thread Alexandre Ratchov
On Thu, Mar 17, 2016 at 09:02:03PM +0100, Martin Pieuchot wrote: > ``ticks'' is in my opinion a really badly named global variable. But we > all know that finding names is hard ;) > > Since its popularity seems to be really high lately, I'd suggest to > rename it. I chose ``hcticks'' for "hardcl

add EdgeRouter Pro to www/octeon.html

2016-03-19 Thread Marcus MERIGHI
Hello, "The patch seems to work fine on an EdgeRouter Pro. OK visa@" (http://marc.info/?l=openbsd-tech&m=145822792814191) EdgeRouter Pro is not on octeon.html, put it there? Bye, Marcus Index: octeon.html === RCS file: /cvs/www/oct

Re: New scheduler for OpenBSD

2016-03-19 Thread Alexandre Ratchov
On Fri, Mar 18, 2016 at 08:00:35PM +0100, Mark Kettenis wrote: > > From: Bob Beck > > Date: Fri, 18 Mar 2016 09:20:35 -0600 > > > > this is cool .. but > > > > I would be interested in someone comparing server workloads, as > > opposed to interactive GUI response, using this. > > > > I wouldn't

Re: Implement delay() using TSC

2016-03-19 Thread Mike Larkin
On Thu, Mar 17, 2016 at 09:44:22AM +0900, Masao Uebayashi wrote: > Implement delay() using TSC > > - Calculate delay using 64-bit RDTSC instruction > - Enable tsc_delay() as delay(9) backend > - Use tsc_delay() only when TSC is invariant > - Configure tsc_delay() after primary CPU is identified >

Re: New scheduler for OpenBSD

2016-03-19 Thread Ray Lai
With this diff on my X200, YouTube used to be a stuttering mess on both chrome and firefox, and is now buttery smooth, even at 1080p. Thanks!

Re: CPUID in amd64/i386 boot code

2016-03-19 Thread Masao Uebayashi
On Wed, Mar 16, 2016 at 11:26:39PM -0700, Mike Larkin wrote: > On Thu, Mar 17, 2016 at 03:15:07PM +0900, Masao Uebayashi wrote: > > This is the intended use, avoid busy-polling of BIOS PC console if > > running on HV. Avoid 100% CPU usage at boot prompt on hypervisors. > > > > Which hypervisors

Re: New scheduler for OpenBSD

2016-03-19 Thread Henrik Friedrichsen
Hey, On Tue, Mar 15, 2016 at 03:05:47PM +0100, Michal Mazurek wrote: > Chrome still isn't smooth. > > Please test, and let me know if the performance of something else > degrades. While Chrome may not be 100% smooth yet, the system is a lot more interactive. I can now play YouTube videos without

arm: remove ixp425

2016-03-19 Thread Patrick Wildt
Hi, based on the SA1 diff, this change also removes IXP425. Patrick diff --git sys/arch/arm/arm/cpu.c sys/arch/arm/arm/cpu.c index 593bdac..5c7e385 100644 --- sys/arch/arm/arm/cpu.c +++ sys/arch/arm/arm/cpu.c @@ -146,13 +146,6 @@ static const char * const pxa27x_steppings[16] = { "rev 12

Octeon memory setup

2016-03-19 Thread Visa Hankala
Octeon firmware provides a list of usable memory regions. I would like to make the memory setup routine use the list instead of hardcoded assumptions. EdgeRouter Pro has a memory layout that does not match with the current code, which causes a kernel crash. I have tested this patch on EdgeRouter L

  1   2   >