Linux kiobuf stuff...

2001-03-03 Thread Zhiui Zhang
While looking at Linux 2.4 code, I see the kiobuf stuff. They implement it because Linux 2.2 lacks raw device support. I am wondering whether FreeBSD has a similar mechanism already in place. My reasonings: (1) FreeBSD's buffer is variable sized while Linux's buffer is fixed sized. So in the

No-passwd account and reboot records

2001-02-04 Thread Zhiui Zhang
Is it possible to create a no-password account? Is it possible to record in a file the times of each reboots? If so, how to do this? Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Obtain a list of active vnodes

2001-02-01 Thread Zhiui Zhang
I tried to obtain a list of vnodes in the system. The command pstat -v no longer works. Is there any way to achieve this or hack the code a little bit to achieve this? Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the

specify a different kernel to boot

2001-01-26 Thread Zhiui Zhang
Is there a way to specify a kernel other than /kernel to boot from? I do not want to do this manually, I want to put it into some configuration file. Thanks, -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

buffer headers in FreeBSD Linux

2001-01-24 Thread Zhiui Zhang
I am wondering why FreeBSD has fixed number of buffer headers (nbuf) while Linux can grow the number of buffer headers on the fly. In FreeBSD, we have a lofreebuffers count. I think this is a reserve for avoiding deadlock when the buffer headers are low. But Linux does not seem to have such a

kernel debugging help

2001-01-22 Thread Zhiui Zhang
I am debugging a kernel. Since a kernel is consisted of many files, how can I load a specific file into gdb, browse it, and set a break point at some line within that file? Right now, I can only view the file whose statements are being executed. Thanks. -Zhihui To Unsubscribe: send mail to

Process virtual memory question

2001-01-11 Thread Zhiui Zhang
Although the 4.4 BSD design and implementation book says the text part of a process starts from 0x,, it actually starts from some place around 0x800, (or 0x8048000 to be exact). What's in the area between 0 - 0x800,? Why do we not use it if it is left empty as shown by

Re: Process virtual memory question

2001-01-11 Thread Zhiui Zhang
In article Pine.SOL.4.21.010008490.22923-10@jade, Zhiui Zhang [EMAIL PROTECTED] wrote: Although the 4.4 BSD design and implementation book says the text part of a process starts from 0x,, it actually starts from some place around 0x800, (or 0x8048000 to be exact). What's in

kernel debugging suggestion needed

2001-01-02 Thread Zhiui Zhang
I have written a KLD and am debugging it. The program often hangs after runs for a while (I guess it enters into some dead loop). Is there a way to attach to the process and somehow find out which code it is executing (with remote debugging or ddb)? Thanks for your help. -Zhihui To

Re: kernel debugging suggestion needed

2001-01-02 Thread Zhiui Zhang
On Tue, 2 Jan 2001, Doug White wrote: On Tue, 2 Jan 2001, Zhiui Zhang wrote: I have written a KLD and am debugging it. The program often hangs after runs for a while (I guess it enters into some dead loop). Is there a way to attach to the process and somehow find out which code

Re: ptrace(PT_GETDBREGS) message in remote debugging

2000-12-07 Thread Zhiui Zhang
Thanks. I tried this on FreeBSD 4.2-Release (because I do not have a stable or current), but I failed: # make Warning: Object directory not changed from original /usr/src/gnu/usr.bin/binutils/gdb cc: ../libbfd/libbfd.a: No such file or directory cc: ../libopcodes/libopcodes.a: No such file

Re: ptrace(PT_GETDBREGS) message in remote debugging

2000-12-07 Thread Zhiui Zhang
Your patch works for me on FreeBSD 4.2-Release. Thanks. -Zhihui On Thu, 7 Dec 2000, Brian Dean wrote: On Thu, Dec 07, 2000 at 03:30:51PM -0500, Zhiui Zhang wrote: Thanks. I tried this on FreeBSD 4.2-Release (because I do not have a stable or current), but I failed: # make

ptrace(PT_GETDBREGS) message in remote debugging

2000-12-06 Thread Zhiui Zhang
I tried remote debugging on FreeBSD 4.2 this morning. Everything was fine, except that I saw the following messages: (gdb) step ptrace(PT_GETDBREGS) failed: No such process ptrace(PT_GETDBREGS) failed: No such process ptrace(PT_GETDBREGS) failed: No such process 201 cred = p ?

simple lock and the lost wakeup problem

2000-11-11 Thread Zhiui Zhang
I am new to SMP subject and have some questions to ask: Is the simplelock() really needed since FreeBSD is using the big giant lock and the kernel is non preemptive? Or has FreeBSD changed the big giant lock and made kernel thread preemptive? Uresha Vahalia talks about Lost Wakeup Problem (page

Protect a VFS buffer from VM - how

2000-11-04 Thread Zhiui Zhang
I understand that memory belonged to a buffer will not be paged out by VM daemon. Now I want protect that memory from being cleaned by VM daemon as well. Should I use vfs_busy_pages() or just assume that since my pages are on the active queue, VM daemon will not touch it (it only cleans pages on

granularity of gettimeofday()

2000-11-03 Thread Zhiui Zhang
The manual says the granularity of gettimeofday() is hardware dependent. The time may be updated continuously or in clock ticks. Can anyone explain for me the two different ways of updating the time? What kind of hardware can help? Thanks for your help. -Zhihui To Unsubscribe: send mail

Re: granularity of gettimeofday()

2000-11-03 Thread Zhiui Zhang
On Fri, 3 Nov 2000, Poul-Henning Kamp wrote: In message Pine.SOL.4.21.0011031156050.29568-10@jade, Zhiui Zhang writes: The manual says the granularity of gettimeofday() is hardware dependent. The time may be updated continuously or in clock ticks. Can anyone explain for me the two

RE: process scheduling quantum

2000-10-03 Thread Zhiui Zhang
On Tue, 3 Oct 2000, John Baldwin wrote: On 02-Oct-00 Zhiui Zhang wrote: Suppose a process is scheduled to run, will it run until its quantum ends unless it calls tsleep() on his own? In other words, is it possible for a process to give up its quantum earlier without having it to do

Re: putting FreeBSD in an extended partition

2000-09-27 Thread Zhiui Zhang
On Tue, 26 Sep 2000, Mike Smith wrote: I am wondering whether there is a good reason for not putting FreeBSD in a DOS extended partition. Good luck booting it. Do you mean as long as I can boot it, the kernel itself has no problem with being putting into a DOS extended partition?

system hangs with BUS Reset

2000-09-27 Thread Zhiui Zhang
I am debugging a program that does a lot of disk I/O and the system hangs briefly with the some repeated messages that looks like: (da0:ahc0:0:0:0): SCB 0x0 - Timed out in Data-in phase, SEQADDR==0x88 (da0:ahc0:0:0:0): BDR message in message buffer (da0:ahc0:0:0:0): SCB 0x0 - Timed out in

Re: putting FreeBSD in an extended partition

2000-09-26 Thread Zhiui Zhang
On Mon, 25 Sep 2000, Doug White wrote: On Sat, 23 Sep 2000, Zhiui Zhang wrote: I am wondering whether there is a good reason for not putting FreeBSD in a DOS extended partition. Good luck booting it. Do you mean as long as I can boot it, the kernel itself has no problem with being

putting FreeBSD in an extended partition

2000-09-23 Thread Zhiui Zhang
I am wondering whether there is a good reason for not putting FreeBSD in a DOS extended partition. I have installed four O.S.es on my laptop and know that could be a limitation if FreeBSD can not be put into a DOS extended partition. I do not see any limitations in the boot loader or kernel that

How to time a system call

2000-09-18 Thread Zhiui Zhang
A friend asks me what will happen if more than one process trying to read the stdin at the same time. There is no way to guarantee that any particular keyboard input will be accepted by a particular process. Since a system call is atomic, this makes me wonder how long it takes to do a system