Re: ata0-master: non aligned DMA transfer attempted

2001-08-27 Thread Zhihui Zhang
On Mon, 27 Aug 2001, Julian Elischer wrote: > Zhihui Zhang wrote: > > > I believe that message is from ata_dmasetup(): > > > > if (((uintptr_t)data & scp->alignment) || (count & scp->alignment)) { > > ata_printf(scp, d

What is VT_TFS?

2001-08-31 Thread Zhihui Zhang
What is the file system that uses VT_TFS in vnode.h? Is it still available on FreeBSD? Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

kernel ddb help

2001-09-05 Thread Zhihui Zhang
I know gdb can source stepping the kernel. But without two machines, you can not do it. Now I have only one machine and the system panic: db> trace bqrelse(cxxx, cxxx, cxxx, c, cxxx) at bqrelse+0x25 is there a way to use these addresses to figure out which line or lines of source are suspec

Re: kernel ddb help

2001-09-05 Thread Zhihui Zhang
On Wed, 5 Sep 2001, Julian Elischer wrote: > you can gdb -k mykernel /dev/mem > and do > list bqrelse+0x25 > (I think) > alternatively, > in ddb you can do: > > > x/iii bqrelse > > and work out what is wrong by reading the machine instructions > > > WHen I have one machine

Re: kernel ddb help

2001-09-05 Thread Zhihui Zhang
Your snapshot is cool and I have found your old mail regarding VMWARE. One more question: Is X-windows needed for this stuff? Thanks, -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Error of BUF_STRATEGY()

2001-09-07 Thread Zhihui Zhang
I use BUF_STRATEGY() in a kernel module to read a sector on a device like /dev/ad0s3g. The biowait() routine after BUF_STRATEGY() gives me errors like EALREADY and EPERM from time to time. I find out that these errors occur after I already wrote the same device by another program. If I wait a b

why use vfs_clean_pages()?

2001-09-11 Thread Zhihui Zhang
The routine vfs_clean_pages() is only called by bdwrite() to tell the VM that the buffer pages are "clean" so that VFS will write them when it sees fit. However, pages belonging to buffers are wired down, which means they are not on any paging queues. So even without vfs_clean_pages(), the pageo

Kernel module debug help

2001-09-13 Thread Zhihui Zhang
I am debugging a KLD and I have got the following panic inside an interrupt context: fault virutal address = 0x1080050 ... interrupt mask = bio kernel trap: type 12, code = 0 Stopped at vwakeup+0x14: decl 0x44(%eax) Where eax is 0x108000c and vwakeup() is called from biodone(). Since this pani

Re: Kernel module debug help

2001-09-14 Thread Zhihui Zhang
have met. -Zhihui On Thu, 13 Sep 2001, Terry Lambert wrote: > Ah. Interesting bug; perhaps related to a similar experience > of my own... so let's stare at it! > > > Zhihui Zhang wrote: > > > > I am debugging a KLD and I have got the following panic

Kernel module debugging help

2001-09-21 Thread Zhihui Zhang
I am using gdb a lot recently and find out that most of the bugs are memory related. I am wondering how to set up a hardware breakpoint which is triggered whenever a memory address is written again. I have no experience with this subject. Another minor question is how to set a static variable i

Make a kernel in a different directory

2001-10-01 Thread Zhihui Zhang
I put the whole kernel code under /test by the following command: #cp -R /usr/src/sys /test My configuration file is under /test/sys/i386/conf. Then I follow all the steps as I usually do to make a kernel and install the kernel (config, make depend, make, and make install). But I got the foll

Re: Make a kernel in a different directory

2001-10-01 Thread Zhihui Zhang
efile in the accf_http directory? > > > On Mon, 1 Oct 2001, Zhihui Zhang wrote: > > > > > I put the whole kernel code under /test by the following command: > > > > #cp -R /usr/src/sys /test > > > > My configuration file is under /test/sys/i386/c

Re: patch #3 (was Re: bleh. Re: ufs_rename panic)

2001-10-03 Thread Zhihui Zhang
The rename routine is probably the most convoluted in the entire file system code (FFS). Now that everybody's memory is fresh, I would like to ask something about it: (1) I am always wondering why not use a global rename lock so that there is only one rename operation in progress at any time

Re: patch #3 (was Re: bleh. Re: ufs_rename panic)

2001-10-03 Thread Zhihui Zhang
On Wed, 3 Oct 2001, Ken Pizzini wrote: > Zhihui Zhang <[EMAIL PROTECTED]> wrote: > > (3) Matt says "For example, if you have two hardlinked files residing in > > different directories both get renamed simultaniously, one of the > > rename()s can fail

hardware watch point support

2001-10-03 Thread Zhihui Zhang
Does FreeBSD 4.3-release support hardware watchpoint? If so, how to enable it? I tried something like: (gdb) watch * 0xc28374d0 Hardware watchpoint 4: * 3263395024 (gdb) watch * (int32_t *) 3263427792 Hardware watchpoint 5: *(int32_t *) 3263427792 But it does not seem to work well. Instead, I h

Re: patch #3 (was Re: bleh. Re: ufs_rename panic)

2001-10-19 Thread Zhihui Zhang
i-bin/archive.pl?id=1&mid=221337&start=2001-10-15&end=2001-10-21 > > (about how things done in Linux). > > > Zhihui Zhang wrote: > > > (1) I am always wondering why not use a global rename lock so that there > > is only one rename operation in progress

where are kernel modules located?

2001-10-20 Thread Zhihui Zhang
Kernel modules are supposed to locate under /modules. It turns out we can find it under /. So where are kernel models located exactly? Thanks, -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: where are kernel modules located?

2001-10-21 Thread Zhihui Zhang
In message <Pine.SOL.4.21.0110201648520.23011-10@onyx> Zhihui Zhang writes: > : Kernel modules are supposed to locate under /modules. It turns out we can > : find it under /. So where are kernel models located exactly? > > In -stable it is /modules (except for about 8 hours i

How to profiling a KLD?

2001-11-08 Thread Zhihui Zhang
I am trying to profile a KLD. It seems to me that adding the following line in its make file does not help: COPTS+= -pg -DGPROF The kernel was configured with "config -p" and I used kgmon -b, kgmon -h, kgmon -p, and gprof /kernel gmon.out > gprof.out to collect the data. But none of my routine

malloc deadlock with M_NOWAIT

2001-11-27 Thread Zhihui Zhang
I am trying to allocate a dynamic number of large memory (128K) by malloc(128K, M_xxx, M_NOWAIT). Although this is not done in an interrupt routine, I figure I'd better use M_NOWAIT so that I can deal with the situation when the memory is low. However, I experience the following deadlock: #1 0

Possible vmopar bug? (was malloc deadlock with M_NOWAIT)

2001-11-27 Thread Zhihui Zhang
VM gurus: This seems to be bug! This morning I sent an email (attached below) regarding a hang at the "vmopar" state. While waiting for responses, I use Google Advanced Groups Search looking for "vmopar" in all FreeBSD archived mailing lists and I did find the following message posted by Xavie

contiguous memory of a buffer

2001-11-29 Thread Zhihui Zhang
I am wondering whether we need contiguous memory for a PHYSICAL buffer to perform the DMA I/O. It seems not, because regular buffers can be consisted of non-contiguous pages. The disk driver should treat both kinds of buffers in the same way. So can I say that any buffers used by kernel (via g

Timedout SCB already complete

2001-11-29 Thread Zhihui Zhang
While running my KLD that does a lot of I/O, I see the following message: ahc0: Timedout SCB already complete. interrupts may not be functioning. This happens after my KLD runs a while. What could be the problem? Where could the bugs likely exist? Thanks for any clue. -Zhihui To Unsubsc

Page fault and bad memory

2001-10-12 Thread Zhihui Zhang
I am writing a program that stresses memory a lot. The program accepts a parameter to indicate how long it runs. For several big values, the program runs OK. But when I give a even bigger one, the system panics at generic_bcopy(). I am wondering whether this has something to do with bad memory

Limiting closed port RST response

2001-10-17 Thread Zhihui Zhang
I was using FreeBSD a while ago, suddenly a lot of messages show up: Limiting closed port RST responses from 224 to 200 packets per seconds. These messages persist even after reboot. What happened? What should I do? Thanks! -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsub

Re: Timedout SCB already complete

2001-11-30 Thread Zhihui Zhang
I have been able to fix this bug in my KLD. I forgot to add a splbio() protection in a function. On Thu, 29 Nov 2001, Zhihui Zhang wrote: > > While running my KLD that does a lot of I/O, I see the following message: > > ahc0: Timedout SCB already complete. interrupts may not be

gdb serial port

2001-12-05 Thread Zhihui Zhang
While compiling a debug kernel, I forgot to set the flag of sio0 to 0x80. Is there anyway I can fix this quickly without recompiling the kernel? Thanks, -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

long long sysctl possible?

2003-03-11 Thread Zhihui Zhang
Hi, I notice that the SYSCTL_INT() only support integer. Is there a support of things like 64-bit SYSCTL_LONGLONG()? If so, where is the sample code? Thanks. -Zhihui -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Disk utilization command

2003-03-14 Thread Zhihui Zhang
Hi, Can anyone please tell me what is the command and syntax of it that can display how much time in percentage a disk is busy? iostat is supposed to do that, but I could not figure out the syntax. Thanks, -Zhihui -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-

high resolution kernel profiling

2003-03-15 Thread Zhihui Zhang
I try to use high resolution kernel profiling today on FreeBSD 4.6 release. I use config -p -p MYKERNEL and later kgmon -Br to start the profiling. However, the file generate by gprof contains many negative numbers such as -0.00, -0.02 under the columns of self and descendents. Why is the case? D

A quick VM question

2001-12-16 Thread Zhihui Zhang
What are the backing objects of the stack and heap area of a process's address space? When are they created? I saw the code vm_map_insert(), but the object argument given is NULL. Thanks, -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of

Re: A quick VM question

2001-12-18 Thread Zhihui Zhang
Now I know FreeBSD could defer creating an VM object until the last minute - when the page fault occurs. Thanks. -Zhihui On Tue, 18 Dec 2001, Matthew Dillon wrote: > > :What are the backing objects of the stack and heap area of a process's > :address space? When are they created? I saw the c

What is HIDE_POSIX & HIDE_BSD?

2002-01-29 Thread Zhihui Zhang
While adding a system call, I notice in file syscall-hide.h there are many instances of HIDE_POSIX() and HIDE_BSD(). What is the purpose of these macros? Maybe they are now obsolete? Thanks! -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body

Re: What is HIDE_POSIX & HIDE_BSD?

2002-01-30 Thread Zhihui Zhang
I can't guess what does it mean by "hiding". Maybe any system call can be hidden from some configuration of the kernel. -Zhihui On Wed, 30 Jan 2002, Peter Pentchev wrote: > On Tue, Jan 29, 2002 at 03:58:16PM -0500, Zhihui Zhang wrote: > > > > While adding a

A question about make install

2002-01-31 Thread Zhihui Zhang
Each time I modify some kernel source, I have to do the following two steps: (1) make (2) make install The second step also re-installs ALL modules even if I only modifies the kernel code (not any of the module code). Is there a better way to do this? Thanks, -Zhihui To Unsubscribe: send m

Ptrace and SIGTRAP problem

2002-02-05 Thread Zhihui Zhang
This is a mystery to me. I have gone through some kernel code without luck. The following small program demonstrates that a parent process can write into the data space of its child by ptrace(). If the parent waits for the child to exit, there is no problem. However, if the parent does not do s

Re: Ptrace and SIGTRAP problem

2002-02-09 Thread Zhihui Zhang
(5) signal? The same program works fine on SunOS. Maybe there is a bug in the kernel. I have looked into sys_process.c and still have no idea. -Zhihui On 9 Feb 2002, Dag-Erling Smorgrav wrote: > Zhihui Zhang <[EMAIL PROTECTED]> writes: > > The following small program demo

Re: Ptrace and SIGTRAP problem

2002-02-09 Thread Zhihui Zhang
On 9 Feb 2002, Dag-Erling Smorgrav wrote: > Zhihui Zhang <[EMAIL PROTECTED]> writes: > > - PT_CONTINUE + waitpid() works fine, the trace program prints out values. > > This is expected behaviour. > > > - PT_CONTINUE alone does not work but no core-dump cau

A weird disk behaviour

2002-03-05 Thread Zhihui Zhang
I am doing some raw I/O test on a seagate SCSI disk running FreeBSD 4.5. This situation is like this: +-++++++++++---+-- | |||||||||| | +-++++++++++---+-- Ea

Re: A weird disk behaviour

2002-03-05 Thread Zhihui Zhang
ke sense to me. -Zhihui > On Tue, 5 Mar 2002, Zhihui Zhang wrote: > > > > > I am doing some raw I/O test on a seagate SCSI disk running FreeBSD 4.5. &g

Re: A weird disk behaviour

2002-03-05 Thread Zhihui Zhang
The machine has 128M memory. I am doing physical I/O one block at a time, so there should be no memory copy. -Zhihui On Tue, 5 Mar 2002, Rogier R. Mulhuijzen wrote: > At 16:03 5-3-2002 -0500, Zhihui Zhang wrote: > > > >On Tue, 5 Mar 2002, Julian Elischer wrote: > > &g

Re: A weird disk behaviour

2002-03-05 Thread Zhihui Zhang
ump these to a > couple of GB and see what happens. > > Also, could you post your actual measurements? > > Lars > > > Zhihui Zhang wrote: > > The machine has 128M memory. I am doing physical I/O one block at a time, > > so there should be no memory copy. >

Re: A weird disk behaviour

2002-03-05 Thread Zhihui Zhang
Several times slower! The point is that writing less data performs worse. So I call it weird. -Zhihui On Tue, 5 Mar 2002, Lars Eggert wrote: > Zhihui Zhang wrote: > > Well, the core of my program is as follows (RANDOM(x) return a value > > between 0 and x): > > > &g

Re: A weird disk behaviour

2002-03-05 Thread Zhihui Zhang
a sysctl variable) is close to the time reported by the user program. -Zhihui On Tue, 5 Mar 2002, Lars Eggert wrote: > Zhihui Zhang wrote: > > Several times slower! The point is that writing less data performs > > worse. So I call it weird. > > Huh? You originally said:

Re: A weird disk behaviour

2002-03-05 Thread Zhihui Zhang
On Tue, 5 Mar 2002, Brian T.Schellenberger wrote: > On Tuesday 05 March 2002 06:29 pm, Julian Elischer wrote: > > On Tue, 5 Mar 2002, Lars Eggert wrote: > > > Zhihui Zhang wrote: > > > > Several times slower! The point is that writing less data performs >

Re: A weird disk behaviour

2002-03-06 Thread Zhihui Zhang
On Tue, 5 Mar 2002, Brian T.Schellenberger wrote: > On Tuesday 05 March 2002 06:32 pm, Zhihui Zhang wrote: > > I apologize for all who have followed this. I made a typo in the original > > email. What I observed is that writing LESS performs WORSE. Since all > >

Re: A weird disk behaviour

2002-03-06 Thread Zhihui Zhang
On Wed, 6 Mar 2002, Peter Edwards wrote: > Zhihui Zhang wrote: > > > > > ... I also do not read anything during the partial block write, > > and I think the disk controller should not do that either. > > If you do a partial block write, surely at some poi

Re: A weird disk behaviour

2002-03-06 Thread Zhihui Zhang
On Wed, 6 Mar 2002, Ian wrote: > > > > Zhihui Zhang wrote: > > > > > > > >> ... I also do not read anything during the partial block write, > >> and I think the disk controller should not do that either. > > > > If you do a part

Re: A weird disk behaviour

2002-03-06 Thread Zhihui Zhang
On Wed, 6 Mar 2002, Peter Pentchev wrote: > On Wed, Mar 06, 2002 at 12:12:44PM -0500, Zhihui Zhang wrote: > > > > > > On Wed, 6 Mar 2002, Peter Edwards wrote: > > > > > Zhihui Zhang wrote: > > > > > > > > > > &g

A question of VM page ownership

2002-03-07 Thread Zhihui Zhang
Is there any fundamental reason why a page can not be owned by more than one VM object? If that was the case, the bogus page stuff in vfs_bio.c could be made cleaner IMHO. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: A question of VM page ownership

2002-03-07 Thread Zhihui Zhang
vm_page_linkage { TAILQ_ENTRY(vm_page_linkage) pageq; struct vm_page * page; } -Zhihui On Thu, 7 Mar 2002, Alfred Perlstein wrote: > * Zhihui Zhang <[EMAIL PROTECTED]> [020307 08:28] wrote: > > > > Is there any fundamental reason why a page can

Re: A question of VM page ownership

2002-03-07 Thread Zhihui Zhang
oes the data come from? > > On Thu, 7 Mar 2002, Zhihui Zhang wrote: > > > > > Is there any fundamental reason why a page can not be owned by more than > > one VM object? If that was the case, the bogus page stuff in vfs_bio.c > > could be made cleaner IMH

total module count

2002-04-01 Thread Zhihui Zhang
I am wondering how many modules in all are compiled during the kernel compilation (make depend; make). Is there any configuration file I can look into to find out all the module names? Thanks, -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the bod

fault on non-fault page - any debugging ideas?

2002-04-10 Thread Zhihui Zhang
While debugging kernel modules, I often get page fault panics. Using "up" command in gdb, I can find out which routine is the culprit. But I can not get information about which statement within that routine causes the problem. Is there a way to get this more exact information? Any help is apprec

Is it a file system code bug?

2002-04-24 Thread Zhihui Zhang
In routine ffs_balloc(), after we have determined that the block is already there, we use the following statement to read the block in: if (flags & B_CLRBUF) { error = bread(vp, lbn, (int)fs->fs_bsize, NOCRED, &nbp); if (error) { br

Collect process sleeping statistics

2002-05-13 Thread Zhihui Zhang
A process can sleep for various reasons such as memory, I/O etc. Is there a way to collect statistics about how long it sleeps for different reasons? Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: Collect process sleeping statistics

2002-05-15 Thread Zhihui Zhang
memory and how long it is waiting for I/O. No other process is running at the same time. -Zhihui On Tue, 14 May 2002, Terry Lambert wrote: > Doug White wrote: > > On Mon, 13 May 2002, Zhihui Zhang wrote: > > > A process can sleep for various reasons such as memory, I/O etc. Is

Re: Collect process sleeping statistics

2002-05-15 Thread Zhihui Zhang
much work?) will help. -Zhihui On Wed, 15 May 2002, Alfred Perlstein wrote: > * Zhihui Zhang <[EMAIL PROTECTED]> [020515 10:33] wrote: > > > > Basically I have a program that does a lot of I/O and alloctes/frees a lot > > of memory. The time command gives result like this

Run configure under binutils

2002-05-18 Thread Zhihui Zhang
I tried to play binutils a little bit under FreeBSD 4.5-release: # cd /usr/src/contrib/binutils # ./configure ... checking for ranlib... (cached) ranlib checking for strip... (cached) strip updating cache ../config.cache loading cache ../config.cache within ltconfig .: Can't open ./../l

kernel daemon clean up

2002-05-20 Thread Zhihui Zhang
When we reboot a machine, it seems to me that the kernel sends signal 15 to daemons and wait 60 seconds for them to finish. In my program, I use kthread_create() to create a daemon, how to make sure that my daemon finishes all its job before reboot can proceed? Do I need to let the daemon catch

kernel I/O timing statistics

2002-05-22 Thread Zhihui Zhang
I have a need to record the total physical times spent on I/O requests during some period. My basic idea is to record the start time when the request is issued somewhere in a disk driver and the finish time somewhere in an interrupt routine. Can any one please tell me where are the right places

RE: kernel thread

2002-06-11 Thread Zhihui Zhang
I asked a very similar question a while ago (within at most two months I think). Try search for subject "kernel daemon cleanup". -Zhihui On Tue, 11 Jun 2002, John Baldwin wrote: > > On 10-Jun-2002 Ferruccio Vitale wrote: > > Hi, > > > > how can I destroy a kernel thread that I previously cre

Command used to trace the stack of a process

2002-10-29 Thread Zhihui Zhang
I remember there is a command in either gdb or ddb which enable you to display the stack of a particular process. Can anyone tell me if there is such a command and what the command is? Thanks! -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body

RE: Command used to trace the stack of a process

2002-10-29 Thread Zhihui Zhang
Thanks. The backtrace often gives something like: + 0x350 Is there a way to quickly determine the correponding source code line? -Zhihui On Tue, 29 Oct 2002, Nate Lawson wrote: > On Tue, 29 Oct 2002, John Baldwin wrote: > > On 29-Oct-2002 Zhihui Zhang wrote: > > >

A quick gdb help

2002-11-12 Thread Zhihui Zhang
I need to set a variable value in gdb: (gdb) set xyz = 1 <- works (gdb) set i = 1<- syntax error near '1' I guess i must have special meaning in gdb. But what if I insist setting it, is there a way? Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscrib

Difference between msync() and fsync()

1999-06-23 Thread Zhihui Zhang
any help. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

A way to crash system (3.1 & 3.2) with floppy

1999-06-28 Thread Zhihui Zhang
oot. Is there anything wrong here or FreeBSD simply does not handle this in a more elegant way? Thanks for any help. ------ Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail

reason for slow user-user memory copy

1999-07-01 Thread Zhihui Zhang
oes a memcpy_to_iovec in tcp_recvmsg(). I am confused by this unexpected timings. More than 80% of the time is spent doing the memcpy. --- Thanks for your help. -- Zhihui Zhang. P

Re: reason for slow user-user memory copy

1999-07-01 Thread Zhihui Zhang
On Thu, 1 Jul 1999, David Greenman wrote: > >A graduate student here implements a mmap() interface to a TCP/IP network > >card. He notices that it takes much longer time to copy from mmapp()'ed > >area to another user area than it takes to copy the same amount of data > >from kernel space to us

Overwrite an executable file that is running

1999-07-06 Thread Zhihui Zhang
this is tedious. This new version should not overwrite the older verion of the file being run. My question is how FreeBSD prevents this from happening? Can anyone point out for me where in the source code this is handled? Thanks a lot. -- Zhihui Zhang

Wrong comment in VM code?

1999-07-08 Thread Zhihui Zhang
the end of vnode_pager_setsize(), we modify the size field. So at least three items can be modified after creation. Am I right? Thanks for any help. ------ Zhihui Zhang. Please visit http://www.freebsd.org -- To U

Help with PCI code understanding

1999-07-15 Thread Zhihui Zhang
Can someone outline the initialization process of PCI devices in FreeBSD? I know many of the basic stuff of PCI introduced in the book "PCI System Architecture". I just want to know how each driver is registered into some linker set and its probe routine gets called. In other words, I want to

Anything special with kmem_map and mb_map?

1999-07-19 Thread Zhihui Zhang
I have been wondering this for some time. There are many kernel submaps: exec_map, clean_map, etc. But if you look the code in vm_map_find(), we have to call splvm() for kmem_map and its submap mb_map, but not for other kernel submaps. So is there anything special with these two kernel submap

understanding code related to forced COW for debugger

1999-07-20 Thread Zhihui Zhang
I have tried to understand the following code in vm_map_lookup() without much success: if (fault_type & VM_PROT_OVERRIDE_WRITE) prot = entry->max_protection; else prot = entry->protection; if (entry->wired_count && (faul

Re: understanding code related to forced COW for debugger

1999-07-21 Thread Zhihui Zhang
On Wed, 21 Jul 1999, Matthew Dillon wrote: > > The VM_PROT_OVERRIDE_WRITE flag is only used for user-wired pages, so > it does not effect 'normal' page handling. Look carefully at the > vm_fault() code (vm/vm_fault.c line 212), that lookup only occurs > with VM_PROT_OVERRIDE_WR

Questions on new-bus source code

1999-08-06 Thread Zhihui Zhang
ppreciated. ------ Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Configuration mechanism of PCI bus

1999-08-09 Thread Zhihui Zhang
en the configuration mechanism is regarded as correctly detected. Any help is appreciated. ---------- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with

Create a dump image of kernel

1999-08-13 Thread Zhihui Zhang
dumpon command. Thanks. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: Create a dump image of kernel

1999-08-13 Thread Zhihui Zhang
On Fri, 13 Aug 1999, Andrzej Bialecki wrote: > On Fri, 13 Aug 1999, Zhihui Zhang wrote: > > > > > Can anyone tell me how to modify the config file to build a kernel that > > creates dump image whenever it panics. Currently I have to use dumpon > > command

Need help with kernel trace

1999-08-14 Thread Zhihui Zhang
e file /etc/rc so that savecore will save core dumps under /usr/crash. The system is running FreeBSD 3.2 - Release. Any help is appreciated. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To

kernel symbol `gd_curpcb' not found

1999-08-16 Thread Zhihui Zhang
ot found. (kgdb) where No stack. Thanks for any help. ------ Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Kernel debugging questions

1999-08-19 Thread Zhihui Zhang
ger exists. You can't do that without a process to debug. Is there something wrong? I did the same thing with the postmortem coredump files and got similar messages. Maybe I am using gdb in a wrong way. Any help is appreciated. ------ Zhihui

Re: Kernel debugging questions

1999-08-19 Thread Zhihui Zhang
On Fri, 20 Aug 1999, Greg Lehey wrote: > You can't control the execution of the kernel, you can just look at > the way things are. With the core dump, you at least have the > advantage that things won't change while you look at them; you can't > even do that with /dev/mem. The other alternativ

Serial cable

1999-08-20 Thread Zhihui Zhang
Hi, Rich: Can you find a serial cable for me? I need to connect two PCs together via RS232 ports. Thanks. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail

Questions for vnconfig

1999-08-21 Thread Zhihui Zhang
1, then we can only use /dev/vn0x. The x stands for one of those eight partitions [a-h] in one slice. (2) For /dev/vn0[a-h], which one from a-h should I use for which purpose? Any help is appreciated. ------ Zhihui Zhang. Please visit http://www.f

What does unp stand for?

1999-08-22 Thread Zhihui Zhang
In file uipc_usrreq.c, there are many routines beginning with unp_. For example, unp_connect(), unp_bind(), etc. What does unp stand for? Thanks. -- Zhihui Zhang. Please visit http://www.freebsd.org

FreeBSD FIFO implementation

1999-08-23 Thread Zhihui Zhang
appreciated. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Help with remote debugging (gdb -k)

1999-08-30 Thread Zhihui Zhang
uot; because I assume this is done by FreeBSD 4.0 automatically and the file debug.kernel is the one with symbols. Any help is appreciated. ------ Zhihui Zhang. Please visit http://www.freebsd.org --

Re: Help with remote debugging (gdb -k)

1999-08-30 Thread Zhihui Zhang
On Mon, 30 Aug 1999, Zhihui Zhang wrote: > > After reading the handbook and some postings in the mailing list archive. > I still can not make remote debugging work. I basically did the following > on FreeBSD-current 4.0 (A is debugging machine, B is the target): > >

Re: Help with remote debugging (gdb -k)

1999-08-30 Thread Zhihui Zhang
> > On Mon, 30 Aug 1999, Zhihui Zhang wrote: > > > (3) On machine A, go to the compile directory: > > > > #gdb -g kernel.debug > > -g? > This is a typo. It should be "gdb -k kernel.debug". I have just posted another message pointing out my

Re: Problems with FIFO open in non-blocking mode?

1999-09-06 Thread Zhihui Zhang
On Mon, 6 Sep 1999, Alex Povolotsky wrote: > Hello! > > The following program > > #include > #include > > main() { > int control; > if ((control = open("STATUS",O_WRONLY|O_NONBLOCK))<0) { > perror("Could not open STATUS "); > exit(1); > } >

The usage of MNT_RELOAD

1999-09-08 Thread Zhihui Zhang
. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: The usage of MNT_RELOAD

1999-09-08 Thread Zhihui Zhang
On Wed, 8 Sep 1999, Luoqi Chen wrote: > > The flag MNT_RELOAD is not documented in mount manpages. From the source > > code, I find that it is always used along with MNT_UPDATE which can be > > speficied by user (-u option). Can anyone explain the usage of MNT_RELOAD > > for me? It seems not

Using gdb with fork()

1999-09-08 Thread Zhihui Zhang
f test2.c if I step that routine. Why it does not work with fork()? Am I missing something? Thanks for any help. ------ Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send m

How to follow child process in gdb

1999-09-08 Thread Zhihui Zhang
ess so that it can wait until I can attach to it. That will not be as easy. -Zhihui > > > > On Wed, 8 Sep 1999, Zhihui Zhang wrote: > > > > > I am using gdb 4.18 on FreeBSD-current. The program being debugged > > consists of two small files: test1.c an

Let a daemon process print a message

1999-09-13 Thread Zhihui Zhang
Can anyone tell me how to let a daemon process print a message to the console? Adding printf() does not work (I wonder if a daemon process has been cut of relationship with stdout). Thanks for any help. -- Zhihui Zhang. Please visit http

Re: Let a daemon process print a message

1999-09-13 Thread Zhihui Zhang
On Mon, 13 Sep 1999, Brian Mitchell (ISSATL) wrote: > syslog() with the proper facility is probably the best way to do this. > Another possibility is opening /dev/console, but I think that will aquire > a controlling terminal. > > On Mon, 13 Sep 1999, Zhihui Zhang wrote: > &

NFS authentication

1999-09-13 Thread Zhihui Zhang
I am wondering where the NFS authentication is done in FreeBSD. Is it done by the NFS daemon mountd (or other daemon) or within the kernel? Can anyone give me a pointer? Thanks a lot. -- Zhihui Zhang. Please visit http://www.freebsd.org

Multiple routes to the same destination

1999-09-17 Thread Zhihui Zhang
. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

The -o port=xxx option in NFS

1999-09-21 Thread Zhihui Zhang
-o port=xxx host:directory directory and the -o port=xxx part will be passed onto the mount_nfs. Is this right? Thanks for any help. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To

<    1   2   3   >