Re: If you are one of the cool kids who cranks kern.bufcachepercent up..

2010-01-17 Thread Janne Johansson

Bob Beck wrote:

My conern is what is actually behind your possible panic. We (including myself)
have been introducing and removing some dlg inspired breakage at the same time
here so it depends what you are doing.

Please continue and let me know what you see.


I redid the tests on my 2G laptop with more recent sys/ and now I cant 
hammer it to death anymore. I also have had a 12-cpu 8G sparc64 make all 
kinds of evil I/O ops, bringing it over 475k vnodes without any issues.


I didnt make a before and after speed test of make build or so, so I 
cant comment on the perceived benefits, but I can't kill the box with 
the patch in, even though I am making -j12 builds, lots of finds over 
the fs and so on.


Must have been the above-mentioned breakage I saw earlier. I'll put it 
on the local anoncvs server to keep an I/O intensive box using it for a 
long time.



2010/1/12 Tobias Ulmer tobi...@tmux.org:

I've managed 568k vnodes on amd64 with 8G ram, all while running make
build in a loop. No issues so far. My other test machine didn't panic
again.




games/fortune/strfile/strfile.8

2010-01-17 Thread Lars Nooden

The output made by strfile currently gets the suffix '.dat' by default.

/Lars

Index: strfile.8
===
RCS file: /cvs/src/games/fortune/strfile/strfile.8,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 strfile.8
--- strfile.8   31 May 2007 19:19:17 -  1.13
+++ strfile.8   17 Jan 2010 11:40:17 -
@@ -59,7 +59,7 @@ a header structure and a table of file o
  This allows random access of the strings.
  .Pp
  The output file, if not specified on the command line, is named
-.Ar source_file Ns Sy .out .
+.Ar source_file Ns Sy .dat .
  .Pp
  The options are as follows:
  .Bl -tag -width -c char



sizeof(x)/sizeof(x[0]) - nitems(x)

2010-01-17 Thread Stuart Henderson
This diff uses nitems in various places in sys/dev/pci. 
If this is wanted I'll do more sometime. No md5 changes.

Ok?

Index: adv_pci.c
===
RCS file: /cvs/src/sys/dev/pci/adv_pci.c,v
retrieving revision 1.10
diff -u -p -r1.10 adv_pci.c
--- adv_pci.c   26 Jun 2008 05:42:17 -  1.10
+++ adv_pci.c   17 Jan 2010 12:39:09 -
@@ -108,7 +108,7 @@ adv_pci_match(parent, match, aux)
void *match, *aux;
 {
return (pci_matchbyid((struct pci_attach_args *)aux, adv_pci_devices,
-   sizeof(adv_pci_devices)/sizeof(adv_pci_devices[0])));
+   nitems(adv_pci_devices)));
 }
 
 
Index: adw_pci.c
===
RCS file: /cvs/src/sys/dev/pci/adw_pci.c,v
retrieving revision 1.15
diff -u -p -r1.15 adw_pci.c
--- adw_pci.c   26 Jun 2008 05:42:17 -  1.15
+++ adw_pci.c   17 Jan 2010 12:39:09 -
@@ -97,7 +97,7 @@ adw_pci_match(parent, match, aux)
void   *aux;
 {
return (pci_matchbyid((struct pci_attach_args *)aux, adw_pci_devices,
-   sizeof(adw_pci_devices)/sizeof(adw_pci_devices[0])));
+   nitems(adw_pci_devices)));
 }
 
 
Index: ahci.c
===
RCS file: /cvs/src/sys/dev/pci/ahci.c,v
retrieving revision 1.157
diff -u -p -r1.157 ahci.c
--- ahci.c  10 Jan 2010 13:19:02 -  1.157
+++ ahci.c  17 Jan 2010 12:39:09 -
@@ -566,7 +566,7 @@ ahci_lookup_device(struct pci_attach_arg
int i;
const struct ahci_device*ad;
 
-   for (i = 0; i  (sizeof(ahci_devices) / sizeof(ahci_devices[0])); i++) {
+   for (i = 0; i  (nitems(ahci_devices)); i++) {
ad = ahci_devices[i];
if (ad-ad_vendor == PCI_VENDOR(pa-pa_id) 
ad-ad_product == PCI_PRODUCT(pa-pa_id))
Index: amdiic.c
===
RCS file: /cvs/src/sys/dev/pci/amdiic.c,v
retrieving revision 1.7
diff -u -p -r1.7 amdiic.c
--- amdiic.c29 Mar 2009 21:53:52 -  1.7
+++ amdiic.c17 Jan 2010 12:39:09 -
@@ -128,8 +128,7 @@ const struct pci_matchid amdiic_ids[] = 
 int
 amdiic_match(struct device *parent, void *match, void *aux)
 {
-   return (pci_matchbyid(aux, amdiic_ids,
-   sizeof(amdiic_ids) / sizeof(amdiic_ids[0])));
+   return (pci_matchbyid(aux, amdiic_ids, nitems(amdiic_ids)));
 }
 
 void
Index: amdpcib.c
===
RCS file: /cvs/src/sys/dev/pci/amdpcib.c,v
retrieving revision 1.1
diff -u -p -r1.1 amdpcib.c
--- amdpcib.c   7 Oct 2007 18:41:06 -   1.1
+++ amdpcib.c   17 Jan 2010 12:39:09 -
@@ -101,7 +101,7 @@ int
 amdpcib_match(struct device *parent, void *match, void *aux)
 { 
if (pci_matchbyid((struct pci_attach_args *)aux, amdpcib_devices,
-   sizeof(amdpcib_devices) / sizeof(amdpcib_devices[0])))
+   nitems(amdpcib_devices)))
return 2;
 
return 0;
Index: amdpm.c
===
RCS file: /cvs/src/sys/dev/pci/amdpm.c,v
retrieving revision 1.23
diff -u -p -r1.23 amdpm.c
--- amdpm.c 26 Jun 2008 05:42:17 -  1.23
+++ amdpm.c 17 Jan 2010 12:39:09 -
@@ -207,8 +207,7 @@ int
 amdpm_match(struct device *parent, void *match, void *aux)
 {
-   return (pci_matchbyid(aux, amdpm_ids,
-   sizeof(amdpm_ids) / sizeof(amdpm_ids[0])));
+   return (pci_matchbyid(aux, amdpm_ids, nitems(amdpm_ids)));
 }
 
 void
Index: arc.c
===
RCS file: /cvs/src/sys/dev/pci/arc.c,v
retrieving revision 1.80
diff -u -p -r1.80 arc.c
--- arc.c   9 Jan 2010 23:15:06 -   1.80
+++ arc.c   17 Jan 2010 12:39:09 -
@@ -547,7 +547,7 @@ arc_match_board(struct pci_attach_args *
const struct arc_board  *ab;
int i;
 
-   for (i = 0; i  sizeof(arc_devices) / sizeof(arc_devices[0]); i++) {
+   for (i = 0; i  nitems(arc_devices); i++) {
ab = arc_devices[i];
 
if (PCI_VENDOR(pa-pa_id) == ab-ab_vendor 
Index: auacer.c
===
RCS file: /cvs/src/sys/dev/pci/auacer.c,v
retrieving revision 1.4
diff -u -p -r1.4 auacer.c
--- auacer.c25 Oct 2008 22:30:43 -  1.4
+++ auacer.c17 Jan 2010 12:39:09 -
@@ -231,7 +231,7 @@ int
 auacer_match(struct device *parent, void *match, void *aux)
 {
return (pci_matchbyid((struct pci_attach_args *)aux, auacer_pci_devices,
-   sizeof(auacer_pci_devices)/sizeof(auacer_pci_devices[0])));
+   nitems(auacer_pci_devices)));
 }
 
 void
@@ -545,7 +545,7 @@ auacer_fixup_rate(int rate)
8000, 11025, 12000, 16000, 22050, 32000, 44100, 48000
};
 
-   for (i 

Re: games/fortune/strfile/strfile.8

2010-01-17 Thread Ingo Schwarze
Hi Lars,

 The output made by strfile currently gets the suffix '.dat' by default.

Fixed, thanks.

Note that strfile(8) is not installed by default, neither the utility
nor the manual.  It's only used by the build process.

Yours,
  Ingo


 Index: strfile.8
 ===
 RCS file: /cvs/src/games/fortune/strfile/strfile.8,v
 retrieving revision 1.13
 diff -u -p -u -p -r1.13 strfile.8
 --- strfile.8   31 May 2007 19:19:17 -  1.13
 +++ strfile.8   17 Jan 2010 11:40:17 -
 @@ -59,7 +59,7 @@ a header structure and a table of file o
   This allows random access of the strings.
   .Pp
   The output file, if not specified on the command line, is named
 -.Ar source_file Ns Sy .out .
 +.Ar source_file Ns Sy .dat .
   .Pp
   The options are as follows:
   .Bl -tag -width -c char



Re: games/fortune/strfile/strfile.8

2010-01-17 Thread Lars Nooden
Ingo Schwarze wrote:

 Note that strfile(8) is not installed by default, neither the utility
 nor the manual.  It's only used by the build process.

Noted.  Thanks.

I missed a second change.

/Lars

Index: strfile.8
===
RCS file: /cvs/src/games/fortune/strfile/strfile.8,v
retrieving revision 1.13
diff -u -p -r1.13 strfile.8
--- strfile.8   31 May 2007 19:19:17 -  1.13
+++ strfile.8   17 Jan 2010 11:59:44 -
@@ -59,7 +59,7 @@ a header structure and a table of file o
 This allows random access of the strings.
 .Pp
 The output file, if not specified on the command line, is named
-.Ar source_file Ns Sy .out .
+.Ar source_file Ns Sy .dat .
 .Pp
 The options are as follows:
 .Bl -tag -width -c char
@@ -136,7 +136,7 @@ is run and then using
 to dump them out in the table order.
 .Sh FILES
 .Bl -tag -width strfile.out -compact
-.It Pa strfile.out
+.It Pa strfile.dat
 default output file.
 .El
 .Sh SEE ALSO



Re: games/fortune/strfile/strfile.8

2010-01-17 Thread Ingo Schwarze
Hi Lars,

 I missed a second change.

Well, i already fixed that one, and two more details, in my commit.  ;-)

 Index: strfile.8
 ===
 RCS file: /cvs/src/games/fortune/strfile/strfile.8,v
 retrieving revision 1.13
 diff -u -p -r1.13 strfile.8
 --- strfile.8   31 May 2007 19:19:17 -  1.13
 +++ strfile.8   17 Jan 2010 11:59:44 -
 @@ -59,7 +59,7 @@ a header structure and a table of file o
  This allows random access of the strings.
  .Pp
  The output file, if not specified on the command line, is named
 -.Ar source_file Ns Sy .out .
 +.Ar source_file Ns Sy .dat .
  .Pp
  The options are as follows:
  .Bl -tag -width -c char
 @@ -136,7 +136,7 @@ is run and then using
  to dump them out in the table order.
  .Sh FILES
  .Bl -tag -width strfile.out -compact
 -.It Pa strfile.out
 +.It Pa strfile.dat
  default output file.
  .El
  .Sh SEE ALSO



cwm no blank labels

2010-01-17 Thread Thomas Pfaff
This diff disallows setting blank labels and pressing Esc while editing
the current one will leave it unchanged. I don't see the point in allowing
empty labels as the windows will just show up as blank entries in the menu.

Also remove `current' variable and just use `cc-label'.

Index: kbfunc.c
===
RCS file: /cvs/OpenBSD/xenocara/app/cwm/kbfunc.c,v
retrieving revision 1.6
retrieving revision 1.6.4.3
diff -u -p -r1.6 -r1.6.4.3
--- kbfunc.c22 Dec 2009 13:11:37 -  1.6
+++ kbfunc.c16 Jan 2010 17:01:54 -  1.6.4.3
@@ -400,18 +400,17 @@ kbfunc_client_label(struct client_ctx *c
 {
struct menu *mi;
struct menu_qmenuq;
-   char*current;
 
TAILQ_INIT(menuq);
 
-   current = cc-label;
-
-   if ((mi = menu_filter(cc-sc, menuq, label, current, 1,
+   if ((mi = menu_filter(cc-sc, menuq, label, cc-label, 1,
search_match_text, NULL)) != NULL) {
-   if (cc-label != NULL)
-   xfree(cc-label);
-   cc-label = xstrdup(mi-text);
-   xfree(mi);
+   if (strlen(mi-text)  0) {
+   if (cc-label != NULL)
+   xfree(cc-label);
+   cc-label = xstrdup(mi-text);
+   xfree(mi);
+   }
}
 }



rt2661 patch to fix interrupt handling under load

2010-01-17 Thread Tom Murphy
Hi,

  I'd like to point out that Roland Dreier's patch as detailed
here: http://www.mail-archive.com/m...@openbsd.org/msg83528.html
Works great on my little Soekris 5501 with a RT2661. (dmesg attached
to end of this email.)

  I do still get the odd wireless drop for 15-20 seconds, but it 
no longer brings up the OACTIVE flag on ral0 and it doesn't make
the system completely freeze (no way of getting a dump, have to 
hard reset.)

  I emailed damien@ on December 1st and got no response. The author
of the patch has expressed his frustration at being able to contact
a developer to get this committed. 

  I would be more than happy to do testing. Feel free to contact me..
I know it's hard to test all hardware devices when there is a lack of them.

  Regards,

  Tom

(kernel was compiled by me, with aforementioned patch above, and is GENERIC)

OpenBSD 4.6-current (GENERIC) #2: Fri Nov 27 12:20:04 GMT 2009
r...@pertho.net:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by AMD PCS (AuthenticAMD 586-class) 500 
MHz
cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX
real mem  = 536440832 (511MB)
avail mem = 511152128 (487MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 20/80/26, BIOS32 rev. 0 @ 0xfac40
pcibios0 at bios0: rev 2.0 @ 0xf/0x1
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xc8000/0xa800
cpu0 at mainbus0: (uniprocessor)
amdmsr0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
io address conflict 0x6100/0x100
io address conflict 0x6200/0x200
pchb0 at pci0 dev 1 function 0 AMD Geode LX rev 0x33
glxsb0 at pci0 dev 1 function 2 AMD Geode LX Crypto rev 0x00: RNG AES
vr0 at pci0 dev 6 function 0 VIA VT6105M RhineIII rev 0x96: irq 11, address 
00:00:24:cb:a6:64
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr1 at pci0 dev 7 function 0 VIA VT6105M RhineIII rev 0x96: irq 5, address 
00:00:24:cb:a6:65
ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr2 at pci0 dev 8 function 0 VIA VT6105M RhineIII rev 0x96: irq 9, address 
00:00:24:cb:a6:66
ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
vr3 at pci0 dev 9 function 0 VIA VT6105M RhineIII rev 0x96: irq 12, address 
00:00:24:cb:a6:67
ukphy3 at vr3 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063, 
model 0x0034
ral0 at pci0 dev 14 function 0 Ralink RT2661 rev 0x00: irq 10, address 
00:14:85:d5:39:bb
ral0: MAC/BBP RT2661D, RF RT2529 (MIMO XR)
glxpcib0 at pci0 dev 20 function 0 AMD CS5536 ISA rev 0x03: rev 0, 32-bit 
3579545Hz timer, watchdog, gpio
gpio0 at glxpcib0: 32 pins
pciide0 at pci0 dev 20 function 2 AMD CS5536 IDE rev 0x01: DMA, channel 0 
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 1: WDC WD1200BEVS-00VAT0
wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors
wd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
ohci0 at pci0 dev 21 function 0 AMD CS5536 USB rev 0x02: irq 15, version 1.0, 
legacy support
ehci0 at pci0 dev 21 function 1 AMD CS5536 USB rev 0x02: irq 15
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 AMD EHCI root hub rev 2.00/1.00 addr 1
isa0 at glxpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
gpio1 at nsclpcsio0: 29 pins
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 AMD OHCI root hub rev 1.00/1.00 addr 1
biomask e1c7 netmask ffe7 ttymask 
mtrr: K6-family MTRR support (2 registers)
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
root on wd0a swap on wd0b dump on wd0b



Re: rt2661 patch to fix interrupt handling under load

2010-01-17 Thread Marco Peereboom
Then if no one objects I'll commit it tomorrow.

On Sun, Jan 17, 2010 at 04:54:09PM -0600, Marco Peereboom wrote:
 Has this been tested on all variants of the chip?
 
 On Sun, Jan 17, 2010 at 07:40:29PM +, Tom Murphy wrote:
  Hi,
  
I'd like to point out that Roland Dreier's patch as detailed
  here: http://www.mail-archive.com/m...@openbsd.org/msg83528.html
  Works great on my little Soekris 5501 with a RT2661. (dmesg attached
  to end of this email.)
  
I do still get the odd wireless drop for 15-20 seconds, but it 
  no longer brings up the OACTIVE flag on ral0 and it doesn't make
  the system completely freeze (no way of getting a dump, have to 
  hard reset.)
  
I emailed damien@ on December 1st and got no response. The author
  of the patch has expressed his frustration at being able to contact
  a developer to get this committed. 
  
I would be more than happy to do testing. Feel free to contact me..
  I know it's hard to test all hardware devices when there is a lack of them.
  
Regards,
  
Tom
  
  (kernel was compiled by me, with aforementioned patch above, and is GENERIC)
  
  OpenBSD 4.6-current (GENERIC) #2: Fri Nov 27 12:20:04 GMT 2009
  r...@pertho.net:/usr/src/sys/arch/i386/compile/GENERIC
  cpu0: Geode(TM) Integrated Processor by AMD PCS (AuthenticAMD 586-class) 
  500 MHz
  cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX
  real mem  = 536440832 (511MB)
  avail mem = 511152128 (487MB)
  mainbus0 at root
  bios0 at mainbus0: AT/286+ BIOS, date 20/80/26, BIOS32 rev. 0 @ 0xfac40
  pcibios0 at bios0: rev 2.0 @ 0xf/0x1
  pcibios0: pcibios_get_intr_routing - function not supported
  pcibios0: PCI IRQ Routing information unavailable.
  pcibios0: PCI bus #0 is the last bus
  bios0: ROM list: 0xc8000/0xa800
  cpu0 at mainbus0: (uniprocessor)
  amdmsr0 at mainbus0
  pci0 at mainbus0 bus 0: configuration mode 1 (bios)
  io address conflict 0x6100/0x100
  io address conflict 0x6200/0x200
  pchb0 at pci0 dev 1 function 0 AMD Geode LX rev 0x33
  glxsb0 at pci0 dev 1 function 2 AMD Geode LX Crypto rev 0x00: RNG AES
  vr0 at pci0 dev 6 function 0 VIA VT6105M RhineIII rev 0x96: irq 11, 
  address 00:00:24:cb:a6:64
  ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
  0x004063, model 0x0034
  vr1 at pci0 dev 7 function 0 VIA VT6105M RhineIII rev 0x96: irq 5, 
  address 00:00:24:cb:a6:65
  ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
  0x004063, model 0x0034
  vr2 at pci0 dev 8 function 0 VIA VT6105M RhineIII rev 0x96: irq 9, 
  address 00:00:24:cb:a6:66
  ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
  0x004063, model 0x0034
  vr3 at pci0 dev 9 function 0 VIA VT6105M RhineIII rev 0x96: irq 12, 
  address 00:00:24:cb:a6:67
  ukphy3 at vr3 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 
  0x004063, model 0x0034
  ral0 at pci0 dev 14 function 0 Ralink RT2661 rev 0x00: irq 10, address 
  00:14:85:d5:39:bb
  ral0: MAC/BBP RT2661D, RF RT2529 (MIMO XR)
  glxpcib0 at pci0 dev 20 function 0 AMD CS5536 ISA rev 0x03: rev 0, 32-bit 
  3579545Hz timer, watchdog, gpio
  gpio0 at glxpcib0: 32 pins
  pciide0 at pci0 dev 20 function 2 AMD CS5536 IDE rev 0x01: DMA, channel 0 
  wired to compatibility, channel 1 wired to compatibility
  wd0 at pciide0 channel 0 drive 1: WDC WD1200BEVS-00VAT0
  wd0: 16-sector PIO, LBA48, 114473MB, 234441648 sectors
  wd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2
  pciide0: channel 1 ignored (disabled)
  ohci0 at pci0 dev 21 function 0 AMD CS5536 USB rev 0x02: irq 15, version 
  1.0, legacy support
  ehci0 at pci0 dev 21 function 1 AMD CS5536 USB rev 0x02: irq 15
  usb0 at ehci0: USB revision 2.0
  uhub0 at usb0 AMD EHCI root hub rev 2.00/1.00 addr 1
  isa0 at glxpcib0
  isadma0 at isa0
  com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
  com0: console
  com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
  pckbc0 at isa0 port 0x60/5
  pcppi0 at isa0 port 0x61
  midi0 at pcppi0: PC speaker
  spkr0 at pcppi0
  nsclpcsio0 at isa0 port 0x2e/2: NSC PC87366 rev 9: GPIO VLM TMS
  gpio1 at nsclpcsio0: 29 pins
  npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
  usb1 at ohci0: USB revision 1.0
  uhub1 at usb1 AMD OHCI root hub rev 1.00/1.00 addr 1
  biomask e1c7 netmask ffe7 ttymask 
  mtrr: K6-family MTRR support (2 registers)
  vscsi0 at root
  scsibus0 at vscsi0: 256 targets
  softraid0 at root
  root on wd0a swap on wd0b dump on wd0b