[patch] sndio.7

2012-12-21 Thread Martin Toft
One typo and two style issues:

--- sndio.7.orig2012-12-21 17:55:39.415008759 +0100
+++ sndio.7 2012-12-21 18:01:20.607018154 +0100
@@ -44,7 +44,7 @@
 while doing all necessary conversions on the fly.
 It can mix multiple streams or split the hardware into
 multiple subdevices, to allow programs to use the hardware
-concurently.
+concurrently.
 .Pp
 Hardware MIDI ports correspond to serial connectors provided by the
 .Xr midi 4
@@ -56,7 +56,7 @@
 Software MIDI thru boxes allow one application to send MIDI data to other
 applications connected to the thru box (for instance a software sequencer
 can send events to multiple software synthesizers).
-There's no hardware involved: thru boxes are created by
+There is no hardware involved: thru boxes are created by
 .Xr sndiod 1 .
 .Pp
 Additionally,
@@ -123,7 +123,7 @@
 .Fl fM
 option on the command line.
 .It Pa option
-Corresponds to the sub-device string registered using the
+Corresponds to the subdevice string registered using the
 .Fl s
 option of
 .Xr sndiod 1 .
@@ -140,7 +140,7 @@
 First audio device exposed by
 .Xr sndiod 1 .
 .It Pa snd/0.rear
-Sub-device registered with
+Subdevice registered with
 .Fl s Fa rear .
 .It Pa midithru/0
 First MIDI thru box created with



Re: [patch] sndio.7

2012-12-21 Thread Martin Toft
  -There's no hardware involved: thru boxes are created by
  +There is no hardware involved: thru boxes are created by
 
 i don;t see why this is an improvement. what's wrong with it?

Well, I didn't mean it was wrong or a bug, but the relaxed style seemed
inconsistent with the rest of the page (in *my* eyes).

The mentioned typo was probably the only important part of my patch.

Martin



Re: Allegations regarding OpenBSD IPSEC

2010-12-21 Thread Martin Toft
On Wed, Dec 22, 2010 at 08:28:51AM +0300, Vadim Zhukov wrote:
  # if there's no /var/db/host.random, make one through /dev/urandom
  ^
  if [ ! -f /var/db/host.random ]; then
 - dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 \
 + dd if=/dev/arandom of=/var/db/host.random bs=1024 count=64 \
   ^
   /dev/null 21
   chmod 600 /var/db/host.random /dev/null 21
  else



Re: [patch] pf.conf

2010-07-28 Thread Martin Toft
On Wed, Jul 28, 2010 at 10:25:27PM +0200, Thordur I Bjornsson wrote:
 Each rule is supposed to be usable as it stands, this is also
 an example ruleset, so removing lo0 is not going to happen
 (this was actually discussed not so long ago among developers).

That makes sense.  I thought about it only a second after having sent
the patch.  The comment also still says remote, which is weird without
the ! lo0 part.



Re: better cpu throttling

2010-07-01 Thread Martin Toft
On Wed, Jun 30, 2010 at 02:32:26PM -0400, Ted Unangst wrote:
 I like this one better.  Slow down the poll interval just a little so
 it's not so hysterical, but also go straight to 100.  If you need CPU,
 you need CPU.  It still backs down slowly, but that's just to prevent
 getting caught in slow mode again. 

Me too - my laptop is (as expected) more responsive than with the other
diff.  Playing a video, however, results in

going up 100
going down 90
going down 80
going up 100
going down 90
going down 80
going down 70
going up 100
going down 90
going down 80
going up 100
going down 90
going up 100
going down 90
going down 80
going down 70
going down 60
...

which is not exactly bad (the video is played just fine), but I wonder
whether it is as efficient battery-wise as converging to e.g. 60-70 over
time.  It is a hard one to wrap one's head around, and I tend to believe
that the automatic throttling is better than fixing/converging the
performance.  When there is work to be done, it needs to be done.  Doing
it fast with higher power usage should be roughly the same as doing it
slow with less power usage, however, the former case seems more
responsive to the user (not relevant for the video example).

My two cents.  Thanks again.

Martin



Re: kernel cpu perf tuning

2010-06-30 Thread Martin Toft
On Tue, Jun 29, 2010 at 11:57:00PM -0400, Ted Unangst wrote:
 Here's a first cut at throwing some code into the kernel.  You'll 
 definitely want to kill apmd if you're running it.  It's rather rough, in 
 the wrong spot, and so on, but it's a place to start for further hacking.  
 I'm not convinced we want to just copy the apmd policy into the kernel, so 
 I haven't done so.

I have been running with the code for an hour while browsing a number of
picture-heavy websites using Firefox.  My laptop definity reacts faster
than before, where I used apmd -C.  I have not tried it without A/C
adapter connected yet.

The laptop is a ThinkPad T41, i.e. Pentium M 1.6 GHz.  The dmesg from
right after boot is attached.  Thank you very much for this addition.
I have been annoyed about apmd's reaction time for a while, and I hope
this addition eventually finds its way into the tree.

Martin


OpenBSD 4.7-current (GENERIC) #2: Wed Jun 30 16:43:59 CEST 2010
r...@bertha.obsd.dk:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) M processor 1600MHz (GenuineIntel 686-class) 1.60 
GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,TM,SBF,EST,TM2
real mem  = 535785472 (510MB)
avail mem = 509558784 (485MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 04/19/05, BIOS32 rev. 0 @ 0xfd750, SMBIOS 
rev. 2.33 @ 0xe0010 (61 entries)
bios0: vendor IBM version 1RETDKWW (3.16 ) date 04/19/2005
bios0: IBM 2373NG9
apm0 at bios0: Power Management spec V1.2
apm0: battery life expectancy 100%
apm0: AC on, battery charge high
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xfd6e0/0x920
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdea0/272 (15 entries)
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371FB ISA rev 0x00)
pcibios0: PCI bus #6 is the last bus
bios0: ROM list: 0xc/0x1 0xd/0x1000 0xd1000/0x1000 0xdc000/0x4000! 
0xe/0x1
cpu0 at mainbus0: (uniprocessor)
cpu0: Enhanced SpeedStep 1595 MHz: speeds: 1600, 1400, 1200, 1000, 800, 600 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
io address conflict 0x5800/0x8
io address conflict 0x5808/0x4
io address conflict 0x5810/0x8
io address conflict 0x580c/0x4
pchb0 at pci0 dev 0 function 0 Intel 82855PM Host rev 0x03
intelagp0 at pchb0
agp0 at intelagp0: aperture at 0xd000, size 0x1000
ppb0 at pci0 dev 1 function 0 Intel 82855PM AGP rev 0x03
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 ATI Radeon Mobility M9 rev 0x02
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
radeondrm0 at vga1: irq 11
drm0 at radeondrm0
uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x01: irq 11
uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x01: irq 11
uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x01: irq 11
ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x01: irq 11
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1
ppb1 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0x81
pci2 at ppb1 bus 2
mem address conflict 0xb000/0x1000
mem address conflict 0xb100/0x1000
cbb0 at pci2 dev 0 function 0 TI PCI4520 CardBus rev 0x01: irq 11
cbb1 at pci2 dev 0 function 1 TI PCI4520 CardBus rev 0x01: irq 11
em0 at pci2 dev 1 function 0 Intel PRO/1000MT (82540EP) rev 0x03: irq 11, 
address 00:11:25:44:6c:4a
ral0 at pci2 dev 2 function 0 Ralink RT2561S rev 0x00: irq 11, address 
00:12:0e:61:81:1c
ral0: MAC/BBP RT2561C, RF RT5225
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 3 device 0 cacheline 0x8, lattimer 0xb0
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 6 device 0 cacheline 0x8, lattimer 0xb0
pcmcia1 at cardslot1
ichpcib0 at pci0 dev 31 function 0 Intel 82801DBM LPC rev 0x01: 24-bit timer 
at 3579545Hz
pciide0 at pci0 dev 31 function 1 Intel 82801DBM IDE rev 0x01: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: WDC WD1200BEVE-11UYT0
wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: HL-DT-ST, DVD-ROM GDR8083N, 0K04 ATAPI 5/cdrom 
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
ichiic0 at pci0 dev 31 function 3 Intel 82801DB SMBus rev 0x01: irq 11
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 512MB DDR SDRAM non-parity PC2700CL2.5
auich0 at pci0 dev 31 function 5 Intel 82801DB AC97 rev 0x01: irq 11, ICH4 
AC97
ac97: codec id 0x41445374 (Analog Devices AD1981B)
ac97: codec features headphone, 20 bit DAC, No 3D Stereo
audio0 at auich0
Intel 82801DB Modem rev 0x01 at pci0 dev 31 function 6 not configured
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 Intel UHCI root hub rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 Intel UHCI root hub rev 1.00/1.00 

cwmrc(5)

2009-08-04 Thread Martin Toft
Because it is more consistent with the documentation for the other
options, and because e.g.

  autogroup 1 ``XTerm''

in .cwmrc doesn't work:

Index: cwmrc.5
===
RCS file: /cvs/xenocara/app/cwm/cwmrc.5,v
retrieving revision 1.25
diff -u -r1.25 cwmrc.5
--- cwmrc.5 17 May 2009 23:40:57 -  1.25
+++ cwmrc.5 4 Aug 2009 20:30:07 -
@@ -27,8 +27,8 @@
 The following options are accepted in the configuration file:
 .Pp
 .Bl -tag -width Ds -compact
-.It Ic autogroup Ar group Dq windowclass
-.It Ic autogroup Ar group Dq windowclass,windowname
+.It Ic autogroup Ar group Ar windowclass
+.It Ic autogroup Ar group Ar windowclass,windowname
 Control automatic window grouping, based on the class and/or name
 properties, where
 .Ar group