Re: FreeBSD on BookPC

2001-04-06 Thread Wes Peters

Paul Marquis wrote:
 
 Can an end user buy a Sahara/Safari or do you have to be an OEM?  If I
 have to be an OEM, where can an individual purchase one?

Sorry, catching up on e-mail finally.  You should be able to buy a
Sahara or Safari from any US FIC distributor.  I'll ask at work tomorrow
for our contact.

-- 
"Where am I, and what am I doing in this handbasket?"

Wes Peters Softweyr LLC
[EMAIL PROTECTED]   http://softweyr.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Adding a new drive

2001-04-06 Thread Jon Molin

Hi

Before you just stopp reading with the thought 'duh, this question is for
freebsd-newbie' please read it becouse i've asked it both at newbie and
questions and haven't got any sullotion.

What I'm trying to do is to simply add a new ide drive with only freebsd to
get some more space and i can't do it. Fdisk doesn't seems to write the info
to the drive. I've used it before so i know there's no problem with the drive
itself, tried both fat32 and ext2fs and that works just fine. The kernel finds
the drive:
ad3: 6187MB FUJITSU MPB3064ATU [13410/15/63] at ata1-slave UDMA33

I've tried all the suggestions on
http://www.freebsd.org/handbook/disks-adding.html without any result. I've
attached an output from script when i try it.

/jon

Script started on Fri Apr  6 09:17:09 2001
You have mail.
jmo# dmesg|grep ad3

ad3: 6187MB FUJITSU MPB3064ATU [13410/15/63] at ata1-slave UDMA33
jmo# fdisk ad3

*** Working on device /dev/ad3 ***
parameters extracted from in-core disklabel are:
cylinders=13410 heads=15 sectors/track=63 (945 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=13410 heads=15 sectors/track=63 (945 blks/cyl)

fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
UNUSED
The data for partition 2 is:
UNUSED
The data for partition 3 is:
UNUSED
The data for partition 4 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
start 63, size 12672387 (6187 Meg), flag 80 (active)
beg: cyl 0/ sector 1/ head 1;
end: cyl 97/ sector 63/ head 14
jmo# dd if=/dev/zero of=/dev/rda1 bs=1k count=111 [@a 
[@d [@3 

1+0 records in
1+0 records out
1024 bytes transferred in 0.001942 secs (527313 bytes/sec)
jmo# fdisk -BI ad3

*** Working on device /dev/ad3 ***
fdisk: invalid fdisk partition table found
jmo# fdisk ad3

*** Working on device /dev/ad3 ***
parameters extracted from in-core disklabel are:
cylinders=13410 heads=15 sectors/track=63 (945 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=13410 heads=15 sectors/track=63 (945 blks/cyl)

fdisk: invalid fdisk partition table found
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
UNUSED
The data for partition 2 is:
UNUSED
The data for partition 3 is:
UNUSED
The data for partition 4 is:
sysid 165,(FreeBSD/NetBSD/386BSD)
start 63, size 12672387 (6187 Meg), flag 80 (active)
beg: cyl 0/ sector 1/ head 1;
end: cyl 97/ sector 63/ head 14
jmo# exit

exit

Script done on Fri Apr  6 09:18:45 2001



New DDB commands

2001-04-06 Thread John Baldwin

Hey all,

I have two new ddb commands for the i386.  Porting them to other platforms
shouldn't be overly difficult.  Both of them are "show" commands.  The first is
a 'show ptrace XX' command which displays a backtrace of the process with the
decimal pid XX.  Since ddb always assumes any address (i.e. parameter) is in
hex, I had to do some funky shifting to make it more intuitive.  As a result,
both 'show ptrace 15' and 'show ptrace 0x15' will give a backtrace for process
15.  If no pid is specified, then it acts just like 'show trace' and displays
the current process' trace.

The second command is 'show pcpu xx' which displays some of the per-cpu data
for the cpu with the cpuid xx.  If an id is not specified, then the current
CPU's info is displayed.  Currently the only fields displayed are the cpuid,
curproc, curpcb, and npxproc fields.  In addition, if witness is compiled into
the kernel, then a list of spinlocks held by the CPU in question is listed.

The patches can be found at http://www.FreeBSD.org/~jhb/patches/ptrace.patch
and http://www.FreeBSD.org/~jhb/patches/pcpu.patch respectively.  I will find
these new commands useful and would like to commit them if there aren't any
objections.

-- 

John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Adding a new drive

2001-04-06 Thread Mike Nowlin

On  0, Jon Molin [EMAIL PROTECTED] wrote:
 Hi
 
 Before you just stopp reading with the thought 'duh, this question is for
 freebsd-newbie' please read it becouse i've asked it both at newbie and
 questions and haven't got any sullotion.
 
 What I'm trying to do is to simply add a new ide drive with only freebsd to
 get some more space and i can't do it. Fdisk doesn't seems to write the info
 to the drive. I've used it before so i know there's no problem with the drive
 itself, tried both fat32 and ext2fs and that works just fine. The kernel finds
 the drive:
 ad3: 6187MB FUJITSU MPB3064ATU [13410/15/63] at ata1-slave UDMA33


Easiest way to do this is to use /stand/sysinstall - be careful about it
(think about what you're doing before you commit anything), but by using the
fdisk  disklabel sections of the prog, it's pretty simple to add an extra
drive...  It warns you that you should "only use this on a RUNNING system!"
in certain places - that's normal.  You're basically editing what the system
uses for mount points, etc.  Just don't muck around with your running
drives...

mike


 PGP signature


Server continues die ...

2001-04-06 Thread Dmitry Samersoff

Youps ... Again ... my servers continue die.

I play with different values around dynamical routing table 
and now server die every week, not every night.

Here is stack dump ... 
What else I can get from kernel core dump?

Thank you!

#0  dumpsys () at ../../kern/kern_shutdown.c:469
#1  0xc014f70b in boot (howto=256) at ../../kern/kern_shutdown.c:309
#2  0xc014fad5 in panic (fmt=0xc02123d4 "from debugger")
at ../../kern/kern_shutdown.c:556
#3  0xc012be41 in db_panic (addr=-1071747724, have_addr=0, count=-1,
modif=0xcc272c08 "")
at ../../ddb/db_command.c:433
#4  0xc012bde1 in db_command (last_cmdp=0xc02416dc,
cmd_table=0xc024153c, 
aux_cmd_tablep=0xc025e7a8) at ../../ddb/db_command.c:333
#5  0xc012bea6 in db_command_loop () at ../../ddb/db_command.c:455
#6  0xc012dfb3 in db_trap (type=3, code=0) at ../../ddb/db_trap.c:71
#7  0xc01e6ab9 in kdb_trap (type=3, code=0, regs=0xcc272d18)
at ../../i386/i386/db_interface.c:158
#8  0xc01f97b4 in trap (frame={tf_fs = 24, tf_es = -1071185904, tf_ds =
16, 
  tf_edi = -1071160832, tf_esi = -1071184288, tf_ebp = -869847712, 
  tf_isp = -869847740, tf_ebx = 134, tf_edx = -1660944387, tf_ecx =
32, tf_eax = 38, 
  tf_trapno = 3, tf_err = 0, tf_eip = -1071747724, tf_cs = 8,
tf_eflags = 582, 
  tf_esp = -1071433725, tf_ss = -1071446679}) at
../../i386/i386/trap.c:569
#9  0xc01e6d74 in Debugger (msg=0xc0230569 "manual escape to debugger")
at machine/cpufunc.h:64
#10 0xc01e3d06 in scgetc (sc=0xc0276200, flags=2) at
../../dev/syscons/syscons.c:3136
#11 0xc01e0d39 in sckbdevent (thiskbd=0xc026ee20, event=0,
arg=0xc0276200)
at ../../dev/syscons/syscons.c:634
#12 0xc01d8dfa in atkbd_intr (kbd=0xc026ee20, arg=0x0) at
../../dev/kbd/atkbd.c:462
#13 0xc0204bb8 in atkbd_isa_intr (arg=0xc026ee20) at
../../isa/atkbd_isa.c:125
#14 0xc0149fdb in lockmgr (lkp=0xcc07d130, flags=6, interlkp=0x0,
p=0xcc268c60)
at ../../kern/kern_lock.c:434
#15 0xc01ba336 in vm_map_lookup_done (map=0xcc07d100, entry=0xcc0cdb70)
at ../../vm/vm_map.c:2651
#16 0xc01b5a44 in _unlock_things (fs=0xcc272ec4, dealloc=1) at
../../vm/vm_fault.c:128
#17 0xc01b5af3 in vm_fault (map=0xcc07d100, vaddr=671903744,
fault_type=3 '\003', 
fault_flags=8) at ../../vm/vm_fault.c:363
#18 0xc01f9af6 in trap_pfault (frame=0xcc272fa8, usermode=1,
eva=671906504)
at ../../i386/i386/trap.c:824
#19 0xc01f9547 in trap (frame={tf_fs = 47, tf_es = 47, tf_ds = 47,
tf_edi = 671906504, 
  tf_esi = 671895552, tf_ebp = -1077937936, tf_isp = -869847084,
tf_ebx = 1336, 
  tf_edx = 0, tf_ecx = 334, tf_eax = 0, tf_trapno = 12, tf_err = 6,
  tf_ss = 47}) at ../../i386/i386/trap.c:359
#20 0x28068ca3 in ?? ()
#21 0x2805f6e2 in ?? ()
#22 0x2805f51c in ?? ()
#23 0x2805e717 in ?? ()



-- 
Dmitry Samersoff, [EMAIL PROTECTED], ICQ:3161705
http://devnull.wplus.net
* There will come soft rains ...

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Adding a new drive

2001-04-06 Thread Andrew Hesford

On Fri, Apr 06, 2001 at 09:21:57AM +0200, Jon Molin wrote:
 jmo# fdisk -BI ad3
 
 *** Working on device /dev/ad3 ***
 fdisk: invalid fdisk partition table found

Obviously you didn't read the man pages. `fdisk -BI ad3` is a typo, most
likely because the disklabel command uses the -Brw flag. From the
man page, we see that fdisk's -B flag reinitializes boot code in sector
0 of the disk. But if there is no code to reinitialize, it exits with an
error, saying you don't have a proper MBR.

If you want a single slice on the disk, just do `fdisk -I ad3`. Then run
disklabel like the walkthrough says.
-- 
Andrew Hesford
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Adding a new drive

2001-04-06 Thread Jon Molin

The -I option gives the same output:
jmo# fdisk -I ad3
*** Working on device /dev/ad3 ***
fdisk: invalid fdisk partition table found
jmo# disklabel -B -w -r ad3s1 auto
disklabel: /dev/ad3s1: Device not configured

/jon

Andrew Hesford wrote:
 
 On Fri, Apr 06, 2001 at 09:21:57AM +0200, Jon Molin wrote:
  jmo# fdisk -BI ad3
 
  *** Working on device /dev/ad3 ***
  fdisk: invalid fdisk partition table found
 
 Obviously you didn't read the man pages. `fdisk -BI ad3` is a typo, most
 likely because the disklabel command uses the -Brw flag. From the
 man page, we see that fdisk's -B flag reinitializes boot code in sector
 0 of the disk. But if there is no code to reinitialize, it exits with an
 error, saying you don't have a proper MBR.
 
 If you want a single slice on the disk, just do `fdisk -I ad3`. Then run
 disklabel like the walkthrough says.
 --
 Andrew Hesford
 [EMAIL PROTECTED]
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-hackers" in the body of the message

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Adding a new drive

2001-04-06 Thread Jon Molin

Mike Nowlin wrote:
 
 On  0, Jon Molin [EMAIL PROTECTED] wrote:
  Hi
 
  Before you just stopp reading with the thought 'duh, this question is for
  freebsd-newbie' please read it becouse i've asked it both at newbie and
  questions and haven't got any sullotion.
 
  What I'm trying to do is to simply add a new ide drive with only freebsd to
  get some more space and i can't do it. Fdisk doesn't seems to write the info
  to the drive. I've used it before so i know there's no problem with the drive
  itself, tried both fat32 and ext2fs and that works just fine. The kernel finds
  the drive:
  ad3: 6187MB FUJITSU MPB3064ATU [13410/15/63] at ata1-slave UDMA33
 
 Easiest way to do this is to use /stand/sysinstall - be careful about it
 (think about what you're doing before you commit anything), but by using the
 fdisk  disklabel sections of the prog, it's pretty simple to add an extra
 drive...  It warns you that you should "only use this on a RUNNING system!"
 in certain places - that's normal.  You're basically editing what the system
 uses for mount points, etc.  Just don't muck around with your running
 drives...
 
 mike
 

Thanks for the quick reply Mike but i've tried that and it the same result
there, it doesn't save. Here's what i do:
Configure-Fdisk-ad3
In there i choose 'A' and i reply yes to if i want it to 'remain cooperative',
then i type 'w' to write and i choose 'none' boot mngr. And fdisk says
happily:

Wrote FDISK partition information out successfully. 

After that i quit back to config menu, goes into label and there i just do an
'auto' to see if it works, there i get the following when i write:
Unable to add /dev/ad3s1b as a swap device: Device not configured
and similar errors for the rest of the partitions. 

And then i exit out to the prompt and do 'fdisk ad3' with the same result as
before. 
I've alos tried rebooting after fdisk before labeling (a guy told me to try
that) but that made no diff.

/jon

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: your mail

2001-04-06 Thread Rasputin

* Aman Sharma [EMAIL PROTECTED] [010405 19:37]:

 i aim to make ufs run as a module on FreeBSD, which
 surely would require a lot of serious kernel
 code-entry points. 
 -- pitfall 
 1. the system after boot will load the kernel image
 into core fromdisc.
 2. kernel runs init.
 3. if init fails, then access to disk is'nt possible
 as thefilesystem module is not running.

And if init *works*, how are you supposed to load your ufs module from disk?

Speaking as someone who compiled IDE support as a module in a Linux
kernel once, I don't recommend it.
-- 
Rasputin
Jack of All Trades :: Master of Nuns

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: your mail

2001-04-06 Thread Joseph Mallett

Actually, it's possibly to do what he's talking about... RE: Using
ReiserFS as a root filesystem, XFS, etc. As well as HURD which uses a
seperate fs server, and Johannes Helander's Lites thesis talks about doing
the same.

It is not at all like doing FS support as a module.

/joseph

--
Joseph Mallett   Security Specialist
[EMAIL PROTECTED] www.newgold.net

irc.newgold.net/#xMach   xMach Core Team
[EMAIL PROTECTED] www.xMach.org

On Fri, 6 Apr 2001, Rasputin wrote:

 * Aman Sharma [EMAIL PROTECTED] [010405 19:37]:
 
  i aim to make ufs run as a module on FreeBSD, which
  surely would require a lot of serious kernel
  code-entry points. 
  -- pitfall 
  1. the system after boot will load the kernel image
  into core fromdisc.
  2. kernel runs init.
  3. if init fails, then access to disk is'nt possible
  as thefilesystem module is not running.
 
 And if init *works*, how are you supposed to load your ufs module from disk?
 
 Speaking as someone who compiled IDE support as a module in a Linux
 kernel once, I don't recommend it.
 -- 
 Rasputin
 Jack of All Trades :: Master of Nuns
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-hackers" in the body of the message
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



RE: system slows down to a crawl

2001-04-06 Thread Koster, K.J.

Dear Andrew,

 
 I just went out and bought that book. It is titled "System Performance
 Tuning," by Mike Loukides, published by O'Reilly, with a swordfish on
 the cover.
 
 It's 11 years old, which means it was pre-FreeBSD (indeed, even
 pre-Linux!), but the main focus is 4.3BSD, which makes many aspects
 still relevant. I am finding it to be an interesting read. 

And after eleven years not only is the information in the book relevant and
useful (even on Windows), the command line examples still work (though not
on Windows).

This book is a prime example of teaching a man how to fish.

Kees Jan


 You are only young once,
   but you can stay immature all your life.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: your mail

2001-04-06 Thread Rasputin

* Joseph Mallett [EMAIL PROTECTED] [010406 09:46]:
 Actually, it's possibly to do what he's talking about... RE: Using
 ReiserFS as a root filesystem, XFS, etc. As well as HURD which uses a
 seperate fs server, and Johannes Helander's Lites thesis talks about doing
 the same.
 
 It is not at all like doing FS support as a module.

Is that because of the loader? I still don't understand how a kernel
can load a module from a disk it doesn't know how to read yet?
Although I have a horrible feeling everyone else does...
-- 
Rasputin
Jack of All Trades :: Master of Nuns

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: your mail

2001-04-06 Thread Daniel O'Connor


On 06-Apr-2001 Rasputin wrote:
  It is not at all like doing FS support as a module.
  Is that because of the loader? I still don't understand how a kernel
  can load a module from a disk it doesn't know how to read yet?
   Although I have a horrible feeling everyone else does...

The loader can read quite a number of file systems, and since it only needs
read-only support adding others is trivial (so I am told :)

The loader can load the kernel and modules off any filesystem it understands.

---
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: New DDB commands

2001-04-06 Thread Boris Popov

On Fri, 6 Apr 2001, John Baldwin wrote:

 I have two new ddb commands for the i386.  Porting them to other platforms
 shouldn't be overly difficult.  Both of them are "show" commands.  The first is
 a 'show ptrace XX' command which displays a backtrace of the process with the
 decimal pid XX.  Since ddb always assumes any address (i.e. parameter) is in
 hex, I had to do some funky shifting to make it more intuitive.  As a result,
 both 'show ptrace 15' and 'show ptrace 0x15' will give a backtrace for process
 15.  If no pid is specified, then it acts just like 'show trace' and displays
 the current process' trace.

Thats exactly what doctor ordered! This significantly simplifies
amount of work needs to be done when there is a need to trace where
process is hung.

 The second command is 'show pcpu xx' which displays some of the per-cpu data
 for the cpu with the cpuid xx.  If an id is not specified, then the current
 CPU's info is displayed.  Currently the only fields displayed are the cpuid,
 curproc, curpcb, and npxproc fields.  In addition, if witness is compiled into
 the kernel, then a list of spinlocks held by the CPU in question is listed.

Well, when I manage my kernel to boot with witness, spinlock list
will be a big help.

--
Boris Popov
http://www.butya.kz/~bp/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: your mail

2001-04-06 Thread Joseph Mallett

Don't worry, Rasputin, we're not all really out to get you.

(Reminder to the Get Rasputin! club, we'll be meeting at 7AM on
irc.newgold.net in #Tech to discuss more ideas to confuse him).

Actually, I'd point you to some good papers, but I don't know any. In
fact, I'm not even sure how I learned... Read some papers on HURS, and
Johannes Helander's Lites Thesis (www.cs.hut.fi/~jvh/)... Aside that, I
dunno how to help... In fact, Johannes might not have even really
mentioned it specifically,... Damn... I'm sure someone else knows a
boot/doco

/joseph

--
Joseph Mallett   Security Specialist
[EMAIL PROTECTED] www.newgold.net

irc.newgold.net/#xMach   xMach Core Team
[EMAIL PROTECTED] www.xMach.org

On Fri, 6 Apr 2001, Rasputin wrote:

 * Joseph Mallett [EMAIL PROTECTED] [010406 09:46]:
  Actually, it's possibly to do what he's talking about... RE: Using
  ReiserFS as a root filesystem, XFS, etc. As well as HURD which uses a
  seperate fs server, and Johannes Helander's Lites thesis talks about doing
  the same.
  
  It is not at all like doing FS support as a module.
 
 Is that because of the loader? I still don't understand how a kernel
 can load a module from a disk it doesn't know how to read yet?
   Although I have a horrible feeling everyone else does...
 -- 
 Rasputin
 Jack of All Trades :: Master of Nuns
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: your mail

2001-04-06 Thread Rasputin

* Daniel O'Connor [EMAIL PROTECTED] [010406 10:08]:
 
 On 06-Apr-2001 Rasputin wrote:
 The loader can load the kernel and modules off any filesystem it understands.
  ^^
Gimme a 'D'! Gimme an 'O'! Gimme an 'H'!
For some reason I thought the kernel loaded it's own modules.

More caffeine please, Nurse

-- 
Rasputin
Jack of All Trades :: Master of Nuns

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: your mail

2001-04-06 Thread Daniel O'Connor


On 06-Apr-2001 Rasputin wrote:
  * Daniel O'Connor [EMAIL PROTECTED] [010406 10:08]:
  
  On 06-Apr-2001 Rasputin wrote:
  The loader can load the kernel and modules off any filesystem it understands.
^^
  Gimme a 'D'! Gimme an 'O'! Gimme an 'H'!
  For some reason I thought the kernel loaded it's own modules.
  
  More caffeine please, Nurse

Heh.. 'boot strap' :)

The kernel can link its own modules after its booted though (I think thats how it
works..)

---
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Sysctl question

2001-04-06 Thread Oscar-Ivan Lepe-Aldama

Hi!
is there a maximum for the size of an object that sysctl can handle?

I'm asking this because I have inserted in a 4.1.1 kernel an array
defined as


struct buf_entry {
unsgined intid;
u_int64_t   tsc;
u_int64_t   pmec1;
u_int64_t   pcem2;
} mybuffer[NUMENTRIES];

SYSCTL_NODE(, CTL_NAVI, experiments, CTLFLAG_RW, 0,"Experiments");
SYSCTL_OPAQUE(_experiments, OID_AUTO, buffer, CTLFLAG_RD, mybuffer,
sizeof(mybuffer), "", "");


When NUMENTRIES equals 10 (100 thousand) everything works well; that
is, I can read the content of the array using

sysctl -b experiments.mybuffer  somefile.raw

But when NUMENTRIES equals 100 (1 million) and I use the above
command to read the content of the array, the system stops working
properly; that is, all virtual terminals freezed so I can't sent any
command to the system, although the kernel seams to be alive as it
responds to ICMP echo packets.

I do want to have a large array within the kernel's memory space as I'm
measuring the performance of some kernel's routines using the Pentium's
Performance Monitoring Event Counters, and the more performance data I
could get in one experiment the best.

By the way, the system under test has 64 MB of RAM and 20 GB of free
space on disk.

Any explanation on the possibility or the impossibility of having such
large array within the kernel memory-space and having it exported
through sysctlt will be verry much appreciated.

Thanks,


-- 

 0 0 0  Oscar-Ivan Lepe-Aldama | UPC-Campus Nord, DAC
 0 0 0  e-mail: [EMAIL PROTECTED]| Modul D6, despatx 116
 0 0 0  phone:  +34 93 401 7187| Jordi Girona, 1-3
 U P C  fax:+34 93 401 7055| 08034 Barcelona - SPAIN
WWW:http://www.ac.upc.es/homes/oscar/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: panic in FFS and other related I/O problems

2001-04-06 Thread Guido van Rooij


Shouldn't this be put in to an option so it gets documented?

-Guido

On Mon, Apr 02, 2001 at 09:12:53AM -0700, Peter Wemm wrote:
...
 diff -u -r1.4 ldscript.i386
 --- conf/ldscript.i3862000/01/11 15:35:16 1.4
 +++ conf/ldscript.i3862001/04/02 16:07:18
 @@ -6,7 +6,7 @@
  SECTIONS
  {
/* Read-only sections, merged into text segment: */
 -  . = 0xc010 + SIZEOF_HEADERS;
 +  . = 0x8010 + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash  : { *(.hash)}
.dynsym: { *(.dynsym)  }
 Index: i386/include/pmap.h
 ===
 RCS file: /home/ncvs/src/sys/i386/include/pmap.h,v
 retrieving revision 1.70
 diff -u -r1.70 pmap.h
 --- i386/include/pmap.h   2000/11/30 01:53:02 1.70
 +++ i386/include/pmap.h   2001/04/02 16:07:18
 @@ -92,9 +92,9 @@
  #endif
  #ifndef NKPDE
  #ifdef SMP
 -#define NKPDE254 /* addressable number of page 
tables/pde's */
 +#define NKPDE510 /* addressable number of page 
tables/pde's */
  #else
 -#define NKPDE255 /* addressable number of page 
tables/pde's */
 +#define NKPDE511 /* addressable number of page 
tables/pde's */
  #endif   /* SMP */
  #endif
  

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



ffsfsn

2001-04-06 Thread Dmitry Sivachenko

Hello!

What does 'ffsfsn' state (shown in top(1) output) mean?
I am inserting records in Postgres, and the process is going very slowly
probably due to postgres is in this state...

Thanks,
--dima

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Automatic fontsize definition in vidcontrol(8) [patch]

2001-04-06 Thread Maxim Sobolev

Hi,

I found it very frustrating that each time I need to change console
font (my native language has 3 different encodings, so I need to do it
regularly) I have to specify not only the font name, but fontsize as
well. I do not see any reasons why vidcontrol(8) can't guess correct
value from the fontfile itself, especially considering that there is
1-to-1 mapping between size of the fontdata and font dimensions. With
this message I'm attaching small patch that adds this functionality to
the utility.

In addition, this patch makes vidcontrol(8) more robust, fixing the
following issues:
o previously vidcontrol could be crashed easily by specifying a valid
uuencoded file with undecoded size greater than the size of the buffer
allocated for that particular fontsize (the same applies for the
screenmap). Now decoding routine will discard any data that exceed the
size of the buffer;

o previously it was quite easy to trash fonts on your console by
erroneously specifying an arbitrary binary file (or even a directory)
instead of a fontfile. Now the utility will refuse to load a binary
file, unless its size is equal to one of 3 possible valid sizes, thus
greatly reducing a possibility of an error.

Please somebody review attached patches.

Thanks!

-Maxim


Index: decode.c
===
RCS file: /home/ncvs/src/usr.sbin/vidcontrol/decode.c,v
retrieving revision 1.8
diff -d -u -r1.8 decode.c
--- decode.c1999/08/28 01:20:29 1.8
+++ decode.c2001/04/06 12:08:43
@@ -35,10 +35,11 @@
 #include string.h
 #include "decode.h"
 
-int decode(FILE *fd, char *buffer)
+int decode(FILE *fd, char *buffer, int len)
 {
-   int n, pos = 0;
-   char *p;
+   int n, pos = 0, tpos;
+   char *bp, *p;
+   char tbuffer[3];
char temp[128];
 
 #defineDEC(c)  (((c) - ' ')  0x3f)
@@ -48,31 +49,49 @@
return(0);
} while (strncmp(temp, "begin ", 6));
sscanf(temp, "begin %o %s", n, temp);
+   bp = buffer;
for (;;) {
if (!fgets(p = temp, sizeof(temp), fd))
return(0);
if ((n = DEC(*p)) = 0)
break;
-   for (++p; n  0; p += 4, n -= 3)
+   for (++p; n  0; p += 4, n -= 3) {
+   tpos = 0;
if (n = 3) {
-   buffer[pos++] = DEC(p[0])2 | DEC(p[1])4;
-   buffer[pos++] = DEC(p[1])4 | DEC(p[2])2;
-   buffer[pos++] = DEC(p[2])6 | DEC(p[3]);
+   tbuffer[tpos++] = DEC(p[0])2 | DEC(p[1])4;
+   tbuffer[tpos++] = DEC(p[1])4 | DEC(p[2])2;
+   tbuffer[tpos++] = DEC(p[2])6 | DEC(p[3]);
}
else {
if (n = 1) {
-   buffer[pos++] =
+   tbuffer[tpos++] =
DEC(p[0])2 | DEC(p[1])4;
}
if (n = 2) {
-   buffer[pos++] =
+   tbuffer[tpos++] =
DEC(p[1])4 | DEC(p[2])2;
}
if (n = 3) {
-   buffer[pos++] =
+   tbuffer[tpos++] =
DEC(p[2])6 | DEC(p[3]);
}
}
+   if (tpos == 0)
+   continue;
+   if (tpos + pos  len) {
+   tpos = len - pos;
+   /*
+* Arrange return value  len to indicate
+* overflow.
+*/
+   pos++;
+   }
+   bcopy(tbuffer, bp, tpos);
+   pos += tpos;
+   bp += tpos;
+   if (pos  len)
+   return(pos);
+   }
}
if (!fgets(temp, sizeof(temp), fd) || strcmp(temp, "end\n"))
return(0);
Index: decode.h
===
RCS file: /home/ncvs/src/usr.sbin/vidcontrol/decode.h,v
retrieving revision 1.1
diff -d -u -r1.1 decode.h
--- decode.h1997/03/07 01:34:44 1.1
+++ decode.h2001/04/06 12:08:43
@@ -1 +1,3 @@
-int decode(FILE *fd, char *buffer);
+/* $FreeBSD$ */
+
+int decode(FILE *fd, char *buffer, int len);
Index: vidcontrol.1
===
RCS file: 

Re: Adding a new drive

2001-04-06 Thread Andrew Hesford

On Fri, Apr 06, 2001 at 10:17:24AM +0200, Jon Molin wrote:
 The -I option gives the same output:
 jmo# fdisk -I ad3
 *** Working on device /dev/ad3 ***
 fdisk: invalid fdisk partition table found
 jmo# disklabel -B -w -r ad3s1 auto
 disklabel: /dev/ad3s1: Device not configured
 
 /jon

Hrm... I'm sorry then. I have no idea why the Handbook asks you to zero
out the device, it consumes a lot of time and really isn't necessary. I
wonder if that could be the source of your problem.

Why don't you try this: re-zero the device, just to make sure it's
clean, then give fdisk another go. If it fails, re-zero it again, and
try to use Windows fdisk (or even Linux) to partition the drive. If
neither one succeeds, you know the disk got trashed, and your failure is
most likely a coincidence. If one *does* succeed, then save the MBR, put
the disk in your FreeBSD box, and edit the existing MBR with the FreeBSD
fdisk.
-- 
Andrew Hesford
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



brandnew MEGA-SITEZ Toplist - Warez, Free-XXX, Drugs

2001-04-06 Thread megasitez

hi Warezfreak,

ENJOY a brandnew german MEGASITEZ Toplist with Warez,Free XXX, Drugs and many more ...

http://www.hf2001.de/topsites/topsites.html

the Mega-Sitez Team Team

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Fix for CDROM boot for IBM PC desktops

2001-04-06 Thread Doug Ambrisko

On on IBM PC desktops a FreeBSD bootable CDROM won't boot and it hangs.  
This has been reported in several places.

The problem is that some BIOSes namely IBM's writes to the boot sector
of the floppy to potentially update the parameters for the emulated
floppy used for the El Torrito boot.  Since we do not allocate space
for a typical MSDOS "Boot Sector" when the BIOS updates this area
it then ends up modifying the boot code which is not a good thing.
The boot code then fails in random ways.  I also did a work-around
for linking the address of "xread" into boot2.c.

The fix is in PR i386/26382:
http://www.freebsd.org/cgi/query-pr.cgi?pr=26382
This would be great to get into 4.3 but probably won't make it.

Thanks, 

Doug A.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: ffsfsn

2001-04-06 Thread Alfred Perlstein

* Dmitry Sivachenko [EMAIL PROTECTED] [010406 05:18] wrote:
 Hello!
 
 What does 'ffsfsn' state (shown in top(1) output) mean?
 I am inserting records in Postgres, and the process is going very slowly
 probably due to postgres is in this state...

Looks like part of the file being fsync'd.  Did you read the docs
that come with Postgresql?  There's an option you need to use to
disable calls to fsync() for each operation that ought to speed
things up for you.

-- 
-Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]]
Represent yourself, show up at BABUG http://www.babug.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



How to increase Kernel memmory ?

2001-04-06 Thread dms

subj.



--
Dmitry Samersoff
[EMAIL PROTECTED], http://devnull.wplus.net
ICQ: 3161705

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: ffsfsn

2001-04-06 Thread thomas graichen

Alfred Perlstein [EMAIL PROTECTED] wrote:
 * Dmitry Sivachenko [EMAIL PROTECTED] [010406 05:18] wrote:
 Hello!
 
 What does 'ffsfsn' state (shown in top(1) output) mean?
 I am inserting records in Postgres, and the process is going very slowly
 probably due to postgres is in this state...

 Looks like part of the file being fsync'd.  Did you read the docs
 that come with Postgresql?  There's an option you need to use to
 disable calls to fsync() for each operation that ought to speed
 things up for you.

might be worth waiting for the soon to be available postgresql 7.1 which
has write ahead logging and can thus run quite safe without fsync
(in 7.0 running without fsync might be a bit unsafe in case of
a crash i think)

t

-- 
thomas graichen [EMAIL PROTECTED] ... perfection is reached, not
when there is no longer anything to add, but when there is no
longer anything to take away. --- antoine de saint-exupery

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: New DDB commands

2001-04-06 Thread John Baldwin


On 06-Apr-01 Boris Popov wrote:
 On Fri, 6 Apr 2001, John Baldwin wrote:
 
 I have two new ddb commands for the i386.  Porting them to other platforms
 shouldn't be overly difficult.  Both of them are "show" commands.  The first
 is
 a 'show ptrace XX' command which displays a backtrace of the process with
 the
 decimal pid XX.  Since ddb always assumes any address (i.e. parameter) is in
 hex, I had to do some funky shifting to make it more intuitive.  As a
 result,
 both 'show ptrace 15' and 'show ptrace 0x15' will give a backtrace for
 process
 15.  If no pid is specified, then it acts just like 'show trace' and
 displays
 the current process' trace.
 
   Thats exactly what doctor ordered! This significantly simplifies
 amount of work needs to be done when there is a need to trace where
 process is hung.

If one can figure out where it is hung... :)

 The second command is 'show pcpu xx' which displays some of the per-cpu data
 for the cpu with the cpuid xx.  If an id is not specified, then the current
 CPU's info is displayed.  Currently the only fields displayed are the cpuid,
 curproc, curpcb, and npxproc fields.  In addition, if witness is compiled
 into
 the kernel, then a list of spinlocks held by the CPU in question is listed.
 
   Well, when I manage my kernel to boot with witness, spinlock list
 will be a big help.

Also, witness provides a command 'show locks' that lists all locks held by the
current process and the current cpu.  I think I may add a command 'show pinfo
xxx' that takes a pid and lists process information such as name, pid, locks
held, etc.

-- 

John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



RE: Fix for CDROM boot for IBM PC desktops

2001-04-06 Thread John Baldwin


On 06-Apr-01 Doug Ambrisko wrote:
 On on IBM PC desktops a FreeBSD bootable CDROM won't boot and it hangs.  
 This has been reported in several places.
 
 The problem is that some BIOSes namely IBM's writes to the boot sector
 of the floppy to potentially update the parameters for the emulated
 floppy used for the El Torrito boot.  Since we do not allocate space
 for a typical MSDOS "Boot Sector" when the BIOS updates this area
 it then ends up modifying the boot code which is not a good thing.
 The boot code then fails in random ways.  I also did a work-around
 for linking the address of "xread" into boot2.c.
 
 The fix is in PR i386/26382:
   http://www.freebsd.org/cgi/query-pr.cgi?pr=26382
 This would be great to get into 4.3 but probably won't make it.

E, gross. :)  Bad BIOS, no cookie.  I don't think the perl script is
needed, simple a one time adjustment of the xread offset in boot2.c should be
enough.  These programs change very rarely

 Thanks, 
 
 Doug A.

-- 

John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Fix for CDROM boot for IBM PC desktops

2001-04-06 Thread Doug Ambrisko

John Baldwin writes:
| On 06-Apr-01 Doug Ambrisko wrote:
|  On on IBM PC desktops a FreeBSD bootable CDROM won't boot and it hangs.  
|  This has been reported in several places.
|  
|  The problem is that some BIOSes namely IBM's writes to the boot sector
|  of the floppy to potentially update the parameters for the emulated
|  floppy used for the El Torrito boot.  Since we do not allocate space
|  for a typical MSDOS "Boot Sector" when the BIOS updates this area
|  it then ends up modifying the boot code which is not a good thing.
|  The boot code then fails in random ways.  I also did a work-around
|  for linking the address of "xread" into boot2.c.
|  
|  The fix is in PR i386/26382:
|http://www.freebsd.org/cgi/query-pr.cgi?pr=26382
|  This would be great to get into 4.3 but probably won't make it.
| 
| E, gross. :)  Bad BIOS, no cookie.  I don't think the perl script is
| needed, simple a one time adjustment of the xread offset in boot2.c should be
| enough.  These programs change very rarely

I also have an update to the patch to make it work on IBM ThinkPads so
that we can boot a FreeBSD CD on a ThinkPad.  The problem on the ThinkPad
is that it reads the values from the defined MSDOS boot sector and
uses them to figure out how to do the emulation.  Which in our cause
is random code values.  Since the BIOS didn't see the media type defined 
as a floppy it made it a IDE device somewhere (such as ad11).  This 
confused the 3rd stage loader.

Here is the updated structure in boot1.s:
  /*  From OpenBSD biosboot.S with tuned values from Doug Ambrisko so 
  ThinkPads can boot from CDROM.  I think the critical part
  is setting the media type.
  */
  .org 0x03, 0x00
  .asciz  "FreeBSD"
  /* BPB */
  .org 0x0b, 0x00
  bpb:.word   512 /* sector size */
  .byte   1   /* sectors/cluster */
  .word   1   /* reserved sectors */
  .byte   2   /* # of FAT */
  .word   224 /* root entries */
  .word   2880/* small sectors */
  .byte   0xf0/* media type (fd) */
  .word   144 /* sectors/fat */
  .word   18  /* sectors per track */
  .word   2   /* # of heads */
  
  /* EBPB */
  .org 0x1c, 0x00
  ebpb:   .long   16  /* hidden sectors */
  .long   0   /* large sectors */

Mark, wanted me to clarify the the BIOS is only changing stuff in
the emulated image and not the media itself.

I think something needs to be done for the linking because it is
really frustrating when stuff changes and there are no warnings
or hints why things just all of a sudden break when a simple change
is made.  Either that or huge warnings saying:

/* "xread" is a hardcoded value in boot2.c, if you change 
   the layout in boot1.s figure out what the new value is
   and then update it in boot2.c */

I like computers to think for me so I don't have to.  I tend to 
make more mistakes then they do!

Thanks for looking at it, any idea on what needs to be done to get this
commited?  I'm currently testing my final patch for ThinkPads but
it takes a while to burn a FreeBSD release CD on a slow 2X burner.

Obviously it would make our lives easier if we can just load things
on the IBM hardware we have around here and reduce traffic on -questions!

Doug A.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Is the solution correct ??

2001-04-06 Thread ªL­^¶W

Dear all :
  I am trying to run Web proxy server , squid , on FreeBSD using
Async-io

   and I modified the FreeBSD source file "vfs_aio.c" ,

   but  when I  run  "squid" ,  it  was killed by the SIGPROF or SIGVTALRM
signal

   I knew the the two signal  was produced by  hardclock() in kern_clock()

  by the following coding

  if (CLKF_USERMODE(frame) 
timevalisset(pstats-p_timer[ITIMER_VIRTUAL].it_value)

itimerdecr(pstats-p_timer[ITIMER_VIRTUAL], tick) == 0)
{
   psignal(p,SIGVTALRM);
}
if (timevalisset(pstats-p_timer[ITIMER_PROF].it_value) 
itimerdecr(pstats-p_timer[ITIMER_PROF], tick) == 0)
{
psignal(p, SIGPROF);
}


so I try to add time interval in the file "vfs_aio.c"
to let   p-p_stats-p_timer[ITIMER_VIRTUAL]  0
andp-p_stats-p_timer[ITIMER_PROF] 0



if(p-p_stats-p_timer[ITIMER_VIRTUAL].it_value.tv_sec  50)
{
getmicrouptime(ctv);
timevaladd(aitv.it_value, ctv);
p-p_stats-p_timer[ITIMER_VIRTUAL]=aitv;
}

 if(p-p_stats-p_timer[ITIMER_PROF].it_value.tv_sec  50)
{
getmicrouptime(ctv);
timevaladd(aitv.it_value, ctv);
p-p_stats-p_timer[ITIMER_PROF]=aitv;
}

Is the solution correct ?
how many timeval should I add ??
Thanks in Advance
  Richard_Lin



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Fix for CDROM boot for IBM PC desktops

2001-04-06 Thread Doug Ambrisko

ambrisko writes:
| I also have an update to the patch to make it work on IBM ThinkPads so
| that we can boot a FreeBSD CD on a ThinkPad.  The problem on the ThinkPad
| is that it reads the values from the defined MSDOS boot sector and
| uses them to figure out how to do the emulation.  Which in our cause
| is random code values.  Since the BIOS didn't see the media type defined 
| as a floppy it made it a IDE device somewhere (such as ad11).  This 
| confused the 3rd stage loader.

I have confirmed that this works.  So now we should be able to boot a FreeBSD
CD on all IBM hardware that I can find around here.  I will revise the PR.

Doug A.
 
| Here is the updated structure in boot1.s:
|   /*  From OpenBSD biosboot.S with tuned values from Doug Ambrisko so 
|   ThinkPads can boot from CDROM.  I think the critical part
|   is setting the media type.
|   */
|   .org 0x03, 0x00
|   .asciz  "FreeBSD"
|   /* BPB */
|   .org 0x0b, 0x00
|   bpb:.word   512 /* sector size */
|   .byte   1   /* sectors/cluster */
|   .word   1   /* reserved sectors */
|   .byte   2   /* # of FAT */
|   .word   224 /* root entries */
|   .word   2880/* small sectors */
|   .byte   0xf0/* media type (fd) */
|   .word   144 /* sectors/fat */
|   .word   18  /* sectors per track */
|   .word   2   /* # of heads */
|   
|   /* EBPB */
|   .org 0x1c, 0x00
|   ebpb:   .long   16  /* hidden sectors */
|   .long   0   /* large sectors */
| 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Fix for CDROM boot for IBM PC desktops

2001-04-06 Thread John Baldwin


On 06-Apr-01 Doug Ambrisko wrote:
 John Baldwin writes:
| On 06-Apr-01 Doug Ambrisko wrote:
|  On on IBM PC desktops a FreeBSD bootable CDROM won't boot and it hangs.  
|  This has been reported in several places.
|  
|  The problem is that some BIOSes namely IBM's writes to the boot sector
|  of the floppy to potentially update the parameters for the emulated
|  floppy used for the El Torrito boot.  Since we do not allocate space
|  for a typical MSDOS "Boot Sector" when the BIOS updates this area
|  it then ends up modifying the boot code which is not a good thing.
|  The boot code then fails in random ways.  I also did a work-around
|  for linking the address of "xread" into boot2.c.
|  
|  The fix is in PR i386/26382:
|http://www.freebsd.org/cgi/query-pr.cgi?pr=26382
|  This would be great to get into 4.3 but probably won't make it.
| 
| E, gross. :)  Bad BIOS, no cookie.  I don't think the perl script is
| needed, simple a one time adjustment of the xread offset in boot2.c should
| be
| enough.  These programs change very rarely
 
 I also have an update to the patch to make it work on IBM ThinkPads so
 that we can boot a FreeBSD CD on a ThinkPad.  The problem on the ThinkPad
 is that it reads the values from the defined MSDOS boot sector and
 uses them to figure out how to do the emulation.  Which in our cause
 is random code values.  Since the BIOS didn't see the media type defined 
 as a floppy it made it a IDE device somewhere (such as ad11).  This 
 confused the 3rd stage loader.
 
 Here is the updated structure in boot1.s:
   /*  From OpenBSD biosboot.S with tuned values from Doug Ambrisko so 
   ThinkPads can boot from CDROM.  I think the critical part
   is setting the media type.
   */
   .org 0x03, 0x00
   .asciz  "FreeBSD"
   /* BPB */
   .org 0x0b, 0x00
   bpb:.word   512 /* sector size */
   .byte   1   /* sectors/cluster */
   .word   1   /* reserved sectors */
   .byte   2   /* # of FAT */
   .word   224 /* root entries */
   .word   2880/* small sectors */
   .byte   0xf0/* media type (fd) */
   .word   144 /* sectors/fat */
   .word   18  /* sectors per track */
   .word   2   /* # of heads */
   
   /* EBPB */
   .org 0x1c, 0x00
   ebpb:   .long   16  /* hidden sectors */
   .long   0   /* large sectors */
 
 Mark, wanted me to clarify the the BIOS is only changing stuff in
 the emulated image and not the media itself.

Understood.  You can't write to a CD-ROM. :)

 I think something needs to be done for the linking because it is
 really frustrating when stuff changes and there are no warnings
 or hints why things just all of a sudden break when a simple change
 is made.  Either that or huge warnings saying:
 
   /* "xread" is a hardcoded value in boot2.c, if you change 
  the layout in boot1.s figure out what the new value is
  and then update it in boot2.c */
 
 I like computers to think for me so I don't have to.  I tend to 
 make more mistakes then they do!

Well, think of boot1 as a really small device driver and xread as a syscall.
The offset is a magic number.

 Thanks for looking at it, any idea on what needs to be done to get this
 commited?  I'm currently testing my final patch for ThinkPads but
 it takes a while to burn a FreeBSD release CD on a slow 2X burner.
 
 Obviously it would make our lives easier if we can just load things
 on the IBM hardware we have around here and reduce traffic on -questions!

The maintainer for this stuff is Robert Nordier (rnordier@) and he'll need to
sign off on it.  Any chance you could figuratively kick the head of whoever at
IBM did this up around their ears for assuming all the world is DOS? :)

 Doug A.

-- 

John Baldwin [EMAIL PROTECTED] -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Fix for CDROM boot for IBM PC desktops

2001-04-06 Thread Doug Ambrisko

John Baldwin writes:
| Well, think of boot1 as a really small device driver and xread as a syscall.
| The offset is a magic number.

I'd prefer not to, but whatever.
 
| The maintainer for this stuff is Robert Nordier (rnordier@) and he'll need to
| sign off on it.  Any chance you could figuratively kick the head of whoever at
| IBM did this up around their ears for assuming all the world is DOS? :)

I'll send a note to him.  I haven't heard anything from him for a long time.

Like right, we can't get info out of "ourselves".  However I have some
insight into the IBM desktop BIOS not that I can change it though.  It
looks like if we just do the first 25 bytes or so then we are safe.
All I can do is make FreeBSD work nicely on IBM machines since there
is an incentive to make that happen here.  Also we can't change the 
X number of machines that are out there.

Doug A.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



ffs dirpref speedup

2001-04-06 Thread Attila Nagy

Hello,

I wonder whether FreeBSD has this improvement or not.

With softupdates or async mounted filesystems it seems that the speedup is
very big...

Thanks,
--
Attila Nagye-mail:  [EMAIL PROTECTED]
Budapest Polytechnic (BMF.HU)   @work: +361 210 1415 (194)
H-1084 Budapest, Tavaszmezo u. 15-17.   cell.: +3630 306 6758
-- Forwarded message --
Date: Sat, 7 Apr 2001 02:02:21 +0400
From: Grigoriy Orlov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: CVS: cvs.openbsd.org: src

On Fri, Apr 06, 2001 at 10:27:55PM +0100, Brian Somers wrote:
  CVSROOT:/cvs
  Module name:src
  Changes by: [EMAIL PROTECTED]2001/04/06 14:43:31
 
  Modified files:
  sys/ufs/ffs: fs.h ffs_alloc.c ffs_vfsops.c
  sbin/fsck_ffs  : setup.c
  sbin/tunefs: tunefs.c
 
  Log message:
  Replace FFS directory preference algorithm(dirpref) by new one.
  It allocates directory inode in the same cylinder group as a parent
  directory in. This speedup file/directory intensive operations on
  a big file systems in times.
 
  Don't forget to recompile fsck_ffs with updated fs.h or you will get
  "VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE" at
  the next boot. In any case you can ignore this error safely.
 
  Requested by deraadt@

 Do you have any numbers or statistics ?  Just curious as to how
 big/small the gain is

  These results is old and I improve algorithm after these tests was done.
Nevertheless they show how big may be perfomance speedup. I have done two
file/directory intensive tests on a two OpenBSD systems with old and new
dirpref algorithm. The first test is "tar -xzf ports.tar.gz", the second
is "rm -rf ports". There ports.tar.gz - port collection from OpenBSD 2.8
release, it contains 6596 dirs and 13868 files. The test systems are:

1. Celeron-450, 128Mb, two IDE drives, the system at wd0, file system for
   test is at wd1. Size of test file system is 8 Gb, number of cg=991,
   size of cg is 8m, block size = 8k, fragment size = 1k OpenBSD-current
   from Dec 2000 with BUFCACHEPERCENT=35

2. PIII-600, 128Mb, two IBM DTLA-307045 IDE drives at i815e, the system
   at wd0, file system for test is at wd1. Size of test file system is 40 Gb,
   number of cg=5324, size of cg is 8m, block size = 8k, fragment size = 1k
   OpenBSD-current from Dec 2000 with BUFCACHEPERCENT=50

  Test Results

 tar -xzf ports.tar.gz rm -rf ports
  mode  old dirpref new dirpref speedup old dirpref new dirpref speedup
 First system
 normal 667 472  1.41   477331   1.44
 async  285 144  1.98   130 14   9.29
 sync   768 616  1.25   477334   1.43
 softdep413 252  1.64   241 38   6.34
 Second system
 normal 329 81   4.06   263.5   93.5 2.81
 async  302 25.711.75   112  2.26   49.56
 sync   281 57.0 4.93   263 90.5 2.9
 softdep341 40.6 8.4284  4.76   59.66

"old dirpref" and "new dirpref" columns give a test time in seconds.
speedup - speed increasement in times, ie. old dirpref / new dirpref.
-

If you want a more detailed algorithm description, please sent mail
to me directly.

Grigoriy.




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



IBM ACP modem driver

2001-04-06 Thread Simon Walton

   A couple of months ago IBM released the source to their linux modem
driver for the thinkpad 600  600E:

http://oss.software.ibm.com/developer/opensource/linux/projects/mwave/

The modem is a controllerless DSP - there is a userspace daemon
the acts as the controller and communicates with the DSP via
a dynamically loaded device driver. The DSP also emulates a serial
chip which allows a standard serial-line driver to be used.

   I have ported the driver to freebsd 4.1.1 on a thinkpad 600E.
The daemon just required a few mods to basically get it to compile;
the kernel module needed a fairly major overhaul, as you might imagine.
It seems to work ok with tip as a simple dialup serial line; I
haven't tried dialup IP.

   I was wondering what the best way to make it available to
other freebsd users was. I emailed IBM about hosting it but they
haven't replied. I think it would take quite a bit of clean-up
to include it in the standard kernel, and I don't have -current
anyway. I'd be willing to make it into a separate package though.

   Any suggestions?

Simon

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: ffs dirpref speedup

2001-04-06 Thread Mike Smith


We discussed this a while back; it has some interesting (and in some 
cases) undesirable side-effects.  FFS tries to balance directories across 
CGs in order to balance the use of CGs for file allocation.  The approach 
being advocated here will tend to use CGs one at a time, resulting in 
poor distribution of files and corresponding fragmentation problems.

 I wonder whether FreeBSD has this improvement or not.
 
 With softupdates or async mounted filesystems it seems that the speedup is
 very big...
 
 Thanks,
 --
 Attila Nagye-mail:  [EMAIL PROTECTED]
 Budapest Polytechnic (BMF.HU)   @work: +361 210 1415 (194)
 H-1084 Budapest, Tavaszmezo u. 15-17.   cell.: +3630 306 6758
 -- Forwarded message --
 Date: Sat, 7 Apr 2001 02:02:21 +0400
 From: Grigoriy Orlov [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: CVS: cvs.openbsd.org: src
 
 On Fri, Apr 06, 2001 at 10:27:55PM +0100, Brian Somers wrote:
   CVSROOT:  /cvs
   Module name:  src
   Changes by:   [EMAIL PROTECTED]2001/04/06 14:43:31
  
   Modified files:
 sys/ufs/ffs: fs.h ffs_alloc.c ffs_vfsops.c
 sbin/fsck_ffs  : setup.c
 sbin/tunefs: tunefs.c
  
   Log message:
   Replace FFS directory preference algorithm(dirpref) by new one.
   It allocates directory inode in the same cylinder group as a parent
   directory in. This speedup file/directory intensive operations on
   a big file systems in times.
  
   Don't forget to recompile fsck_ffs with updated fs.h or you will get
   "VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE" at
   the next boot. In any case you can ignore this error safely.
  
   Requested by deraadt@
 
  Do you have any numbers or statistics ?  Just curious as to how
  big/small the gain is
 
   These results is old and I improve algorithm after these tests was done.
 Nevertheless they show how big may be perfomance speedup. I have done two
 file/directory intensive tests on a two OpenBSD systems with old and new
 dirpref algorithm. The first test is "tar -xzf ports.tar.gz", the second
 is "rm -rf ports". There ports.tar.gz - port collection from OpenBSD 2.8
 release, it contains 6596 dirs and 13868 files. The test systems are:
 
 1. Celeron-450, 128Mb, two IDE drives, the system at wd0, file system for
test is at wd1. Size of test file system is 8 Gb, number of cg=991,
size of cg is 8m, block size = 8k, fragment size = 1k OpenBSD-current
from Dec 2000 with BUFCACHEPERCENT=35
 
 2. PIII-600, 128Mb, two IBM DTLA-307045 IDE drives at i815e, the system
at wd0, file system for test is at wd1. Size of test file system is 40 Gb,
number of cg=5324, size of cg is 8m, block size = 8k, fragment size = 1k
OpenBSD-current from Dec 2000 with BUFCACHEPERCENT=50
 
   Test Results
 
  tar -xzf ports.tar.gz rm -rf ports
   mode  old dirpref new dirpref speedup old dirpref new dirpref speedup
  First system
  normal 667 472  1.41   477331   1.44
  async  285 144  1.98   130 14   9.29
  sync   768 616  1.25   477334   1.43
  softdep413 252  1.64   241 38   6.34
  Second system
  normal 329 81   4.06   263.5   93.5 2.81
  async  302 25.711.75   112  2.26   49.56
  sync   281 57.0 4.93   263 90.5 2.9
  softdep341 40.6 8.4284  4.76   59.66
 
 "old dirpref" and "new dirpref" columns give a test time in seconds.
 speedup - speed increasement in times, ie. old dirpref / new dirpref.
 -
 
 If you want a more detailed algorithm description, please sent mail
 to me directly.
 
   Grigoriy.
 
 
 
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-hackers" in the body of the message

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]
   V I C T O R Y   N O T   V E N G E A N C E



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: IBM ACP modem driver

2001-04-06 Thread Justin T. Gibbs

   A couple of months ago IBM released the source to their linux modem
driver for the thinkpad 600  600E:

I was looking to port this stuff to -current, so I'd be interested
in seeing your patches.  It would be nice if we could simply
rewrite the kernel portion of the code to avoid the GPL license
on the original IBM code.

--
Justin

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Upgrading both of OpenSSL and OpenSSH at FreeBSD 4.2

2001-04-06 Thread SysAdmin

Any body can told me how 
Thx.

SA
--
Email ini dikirim oleh PlasaCom : http://www.plasa.com
Cepat di-download via TelkomNet Instan http://www.plasa.com/instan
Rindukah Anda bertemu dengan ex teman-teman satu sekolah dulu ?
Kunjungilah mereka (41.203 anggota) di KSI : http://ksi.plasa.com
--


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: ffs dirpref speedup

2001-04-06 Thread Brian Somers

There's a (maybe overly simple) avoidance algorithm for this.  
It attempts to ensure that it doesn't end up filling up cgs with 
directories and no files.  

There are also two tunables

int32_t  fs_avgfilesize;   /* expected average file size */
int32_t  fs_avgfpdir;  /* expected # of files per directory */

aimed at being able to tune things such as squid caches (and I would 
guess the ports tree).

 We discussed this a while back; it has some interesting (and in some 
 cases) undesirable side-effects.  FFS tries to balance directories across 
 CGs in order to balance the use of CGs for file allocation.  The approach 
 being advocated here will tend to use CGs one at a time, resulting in 
 poor distribution of files and corresponding fragmentation problems.
 
  I wonder whether FreeBSD has this improvement or not.
  
  With softupdates or async mounted filesystems it seems that the speedup is
  very big...
  
  Thanks,
  --
  Attila Nagye-mail:  [EMAIL PROTECTED]
  Budapest Polytechnic (BMF.HU)   @work: +361 210 1415 (194)
  H-1084 Budapest, Tavaszmezo u. 15-17.   cell.: +3630 306 6758
  -- Forwarded message --
  Date: Sat, 7 Apr 2001 02:02:21 +0400
  From: Grigoriy Orlov [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: CVS: cvs.openbsd.org: src
  
  On Fri, Apr 06, 2001 at 10:27:55PM +0100, Brian Somers wrote:
CVSROOT:/cvs
Module name:src
Changes by: [EMAIL PROTECTED]2001/04/06 14:43:31
   
Modified files:
sys/ufs/ffs: fs.h ffs_alloc.c ffs_vfsops.c
sbin/fsck_ffs  : setup.c
sbin/tunefs: tunefs.c
   
Log message:
Replace FFS directory preference algorithm(dirpref) by new one.
It allocates directory inode in the same cylinder group as a parent
directory in. This speedup file/directory intensive operations on
a big file systems in times.
   
Don't forget to recompile fsck_ffs with updated fs.h or you will get
"VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE" at
the next boot. In any case you can ignore this error safely.
   
Requested by deraadt@
  
   Do you have any numbers or statistics ?  Just curious as to how
   big/small the gain is
  
These results is old and I improve algorithm after these tests was done.
  Nevertheless they show how big may be perfomance speedup. I have done two
  file/directory intensive tests on a two OpenBSD systems with old and new
  dirpref algorithm. The first test is "tar -xzf ports.tar.gz", the second
  is "rm -rf ports". There ports.tar.gz - port collection from OpenBSD 2.8
  release, it contains 6596 dirs and 13868 files. The test systems are:
  
  1. Celeron-450, 128Mb, two IDE drives, the system at wd0, file system for
 test is at wd1. Size of test file system is 8 Gb, number of cg=991,
 size of cg is 8m, block size = 8k, fragment size = 1k OpenBSD-current
 from Dec 2000 with BUFCACHEPERCENT=35
  
  2. PIII-600, 128Mb, two IBM DTLA-307045 IDE drives at i815e, the system
 at wd0, file system for test is at wd1. Size of test file system is 40 Gb,
 number of cg=5324, size of cg is 8m, block size = 8k, fragment size = 1k
 OpenBSD-current from Dec 2000 with BUFCACHEPERCENT=50
  
Test Results
  
   tar -xzf ports.tar.gz rm -rf ports
mode  old dirpref new dirpref speedup old dirpref new dirpref speedup
   First system
   normal 667 472  1.41   477331   1.44
   async  285 144  1.98   130 14   9.29
   sync   768 616  1.25   477334   1.43
   softdep413 252  1.64   241 38   6.34
   Second system
   normal 329 81   4.06   263.5   93.5 2.81
   async  302 25.711.75   112  2.26   49.56
   sync   281 57.0 4.93   263 90.5 2.9
   softdep341 40.6 8.4284  4.76   59.66
  
  "old dirpref" and "new dirpref" columns give a test time in seconds.
  speedup - speed increasement in times, ie. old dirpref / new dirpref.
  -
  
  If you want a more detailed algorithm description, please sent mail
  to me directly.
  
  Grigoriy.
  
  
  
  
  To Unsubscribe: send mail to [EMAIL PROTECTED]
  with "unsubscribe freebsd-hackers" in the body of the message
 
 -- 
 ... every activity meets with opposition, everyone who acts has his
 rivals and unfortunately opponents also.  But not because people want
 to be opponents, rather because the tasks and relationships force
 people to take different points of view.  [Dr. Fritz Todt]
V I C T O R Y   N O T   V 

Re: IBM ACP modem driver

2001-04-06 Thread Simon Walton

"Justin T. Gibbs" wrote:
 
A couple of months ago IBM released the source to their linux modem
 driver for the thinkpad 600  600E:
 
 I was looking to port this stuff to -current, so I'd be interested
 in seeing your patches.  It would be nice if we could simply
 rewrite the kernel portion of the code to avoid the GPL license
 on the original IBM code.

   I think that would be a lot of work. Might be easier to persuade
IBM to release just the kernel portion under a BSD licence.

   I will bundle up my version of the driver and send it to you.

Simon

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: IBM ACP modem driver

2001-04-06 Thread Will Andrews

On Fri, Apr 06, 2001 at 05:21:05PM -0700, Simon Walton wrote:
I think that would be a lot of work. Might be easier to persuade
 IBM to release just the kernel portion under a BSD licence.

Or just to offer a kernel module that's not enabled by default.

-- 
wca

 PGP signature


Re: creating an fdisk partition in an automated way

2001-04-06 Thread dannyman

On Wed, Apr 04, 2001 at 08:58:12PM -0700, Doug White wrote:
[...]
 fdisk -I is your friend. (DANGER: THIS IS DESTRUCTIVE -- READ THE MAN
 PAGE FIRST!)

Yeah ... I use it.  It seems to do the right thing.  Then disklabel doesn't
work. :

I'm looking like this:

#!/bin/sh

disk='da0'

fdisk -I ${disk}

disk=${disk}s1

disklabel -r -w $disk auto

Disklabel pukes.  I've found a similar case at:
http://groups.google.com/groups?q=%22cannot+find+label%22+%22no+disk+label%22+fdiskhl=enlr=safe=offrnum=1seld=972266336ic=1

I emailed Matt Dillon to see if he solved the problem.  You have no idea, eh?
Or do you do something slightly different?  These commands work great if I run
sysinstall over to DTRT at first, but on a virgin bare disk, ... nada. :

Thanks,
-danny

-- 
http://dannyman.toldme.com/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: accessing ide

2001-04-06 Thread Michel Hoche-Mong


perhaps you want /dev/rad0 ?


On Fri, Mar 30, 2001 at 01:15:26AM +0200, Sandeep Kohli wrote:
 
 god,
 thas what i am trying to say.../dev/ad0 or /dev/wd0 whatever is not working
 whereas /dev/hda in Linux is workinf perfectly...
 also hexdump /dev/hda ( in Linux) and hexdump /dev/ad0 (or /dev/wd0) gave me the
 same results
 now can anyone answer that
 thanks
 
 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Why is the process killed ??

2001-04-06 Thread ªL­^¶W

Dear all :

the user process have the following  code  in the "main.c"

to catch the signal "SIGPROF" and "SIGVTALRM"

but the process is still killed by SIGVTALRM signal

Could anyone explain what is the reason maybe ?

Thanks in advance.

Richard_Lin


***
void catchalrm (int signo)
{
  printf("\nCATCH SIGNAL: signo=%d\n",signo);
  printf("CATCH RETURN\n");
}

**main.c**
main()
{
..
..
act.sa_handler=catchalrm;
sigfillset((act.sa_mask));
sigaction(SIGPROF, act,NULL);
sigaction(SIGVTALRM,act,NULL);
sigaction(SIGALRM,act,NULL);
...
...
}





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: IBM ACP modem driver

2001-04-06 Thread Takanori Watanabe

In message [EMAIL PROTECTED], Simon Walton $B$5$s$$$o$/(B:
   A couple of months ago IBM released the source to their linux modem
driver for the thinkpad 600  600E:

There is one more WinModem driver : Lucent Winmodem driver.
This was made by WATANABE Kiyoshi [EMAIL PROTECTED] .
http://www.geocities.com/wtnbkysh/

Unfortunately it is for 4-STABLE, so I tried to rewrite it for CURRENT,
but not succeeded to work yet.
The partly rewrite version is here:
http://people.freebsd.org/~takawata/ltmdmsio.c

To use this, you need to download driver for linux 
(at Lucent site or  
http://walbran.org/sean/linux/stodolsk/ltmodem-5.78e.tar.gz)
and get 
ltmdmobj.o
Then link it.(In the archive , there is no documents written in English.)

I am happy if someone port it to CURRENT.

Takanori Watanabe
a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html"
Public Key/a
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message