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 submaps

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 && (fault

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_WRI

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 majord...@freebsd.org 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 majord...@freebsd.o

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 majord...@freebsd.org 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 after sy

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
d. (kgdb) where No stack. Thanks for any help. ------ Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers

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 Zhang

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 alternative

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 to

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 majord...@freebsd.org 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): > > (1) Bu

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 mista

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 majord...@freebsd.org 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 t

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 mail

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 majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message

Metablock caching & negative block #

1999-05-12 Thread Zhihui Zhang
. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message

VOP_LEASE(...) or (void)VOP_LEASE(...)?

1999-05-13 Thread Zhihui Zhang
. Why do not we use { &vop_lease_desc, (vop_t *) nqnfs_vop_lease_check }, instead of { &vop_lease_desc, (vop_t *) vop_null }, in nfsv2_vnodeop_entries[] in file nfs_vnops.c? Thanks for any help. ------ Zhih

cylinder group and special device

1999-05-17 Thread Zhihui Zhang
. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message

What does VOP_WHITEOUT() do?

1999-05-20 Thread Zhihui Zhang
Can anyone tell me what does VOP_WHITEOUT() do? I can not find it in the hypertext manual pages. Thanks. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to

open a file for read and write

1999-05-21 Thread Zhihui Zhang
(file descriptors). Other than these, are there any performance reasons for doing so? Method (2) is used in source code file mkfs.c when we open a special device file to create a file system. Thanks for any help. -Zhihui -- Zhihui Zhang. Please

mmap of a network buffer

1999-05-21 Thread Zhihui Zhang
-- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message

A bug in namei cache?

1999-05-25 Thread Zhihui Zhang
purge cache entries recursively down the subtree. Will this result in a lot of stale entries in the namecache? FreeBSD 3.1 no longer allows stale entries in the namei cache (FreeBSD 2.2.8 does). Thanks for any help. -- Zhihui Zhang. Please visit

Re: File system gets too fragmented ???

1999-05-27 Thread Zhihui Zhang
> > It might help somewhat if a file that grows by a fragment can allocate > the free fragment immediately preceeding it instead of being relocated > to a fresh block. I don't know if FFS does this or not. > Really? FFS allocates free fragments with bitmap, so it should be able to find free fr

Re: A bug in namei cache? (stale entries)

1999-05-27 Thread Zhihui Zhang
On 27 May 1999, Ville-Pertti Keinonen wrote: > zzh...@cs.binghamton.edu (Zhihui Zhang) writes: > > > Suppose you want to mv a directory file (with subdirectories) to another > > name (it is like grafting a subtree to another point), the namecache > > associated with t

Algorithm used to delete part of a file

1999-05-28 Thread Zhihui Zhang
hope someone can suggest me a better way to understand this or describe briefly the algorithm. Any help is appreciated. -Zhihui -- Zhihui Zhang. Please visit http://www.freebsd.org -- To

Re: Algorithm used to delete part of a file

1999-05-28 Thread Zhihui Zhang
On Fri, 28 May 1999, Christopher R. Bowman wrote: > It is difficult to understand if you are talking at the file system layer > (because you mention data and indirect blocks) or the application layer (you > mention looking at the vi code). At the file system layer you don't delete > blocks in th

Re: Algorithm used to delete part of a file

1999-05-29 Thread Zhihui Zhang
On Sat, 29 May 1999, Duncan Barclay wrote: > Primarily the file system is a "block" orientated storage media where a > "block" > is the fragment size or a file system block. Addressing in the filesystem is > done on a block by block basis. As each block is a number of bytes we cannot > use byte a

question about vnode and inode locking

1999-05-30 Thread Zhihui Zhang
It seems to me that we can lock at the vnode layer AND at the inode layer. Since an inode is always associated with a vnode, and is accessed via its vnode, I do not see the reason why we should lock the inode after having locked the vnode. Can anyone help me with this? Thanks a lot. -Zhihui

Accessing special device files

1999-05-31 Thread Zhihui Zhang
K_SET), it will actually do lseek(fd, 8192, SEEK_SET)? Thanks for any help. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with "u

Re: Accessing special device files

1999-06-01 Thread Zhihui Zhang
On Tue, 1 Jun 1999, Wes Peters wrote: > > ??? > > dd verifies the behavior you report: > > r...@homer# dd if=/dev/rwd0s2b of=/dev/null bs=1 > dd: /dev/rwd0s2b: Invalid argument > ... > r...@homer# dd if=/dev/rwd0s2b of=/dev/null bs=512 > ^C18805+0 records in > ... > > w...@homer$ ls -l /dev/*

The choice of MAXPHYS

1999-06-03 Thread Zhihui Zhang
The value of MAXPHYS is chosen to be 64K for the maximum raw I/O transfer size. I am wondering why it is not set larger. The maxcontig value of FFS is default to be 16, which means 16*8192 or 128K bytes (twice as big as 64K) . If we raise the value of MAXPHYS, we can put more data blocks of a big

Re: allocate file blocks contiguously

1999-06-06 Thread Zhihui Zhang
e version > of that paper. > > > --Farshid > > On Wed, 2 Jun 1999, Zhihui Zhang wrote: > > > > > In FFS, there is a parameter called maxcontig (default to 16) that > > determines the number of blocks we can allocate contiguously for a single > > file. What is

help with I/O optimization with object

1999-06-07 Thread Zhihui Zhang
help is appreciated. ---------- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message

Re: help with I/O optimization with object

1999-06-07 Thread Zhihui Zhang
On Mon, 7 Jun 1999, Zhihui Zhang wrote: > > While studying the file ufs_readwrite.c, I see routines like uiomoveco() > that calls vm_uiomove() in vm_map.c. I am almost sure that these are new > in FreeBSD 3.x. The comment in ffs_read() says "not a VM based I/O > requests&

What is FTW?

1999-06-09 Thread Zhihui Zhang
programs that create archives from a file tree in a depth first way? Do these programs rebuild the file tree from archive exactly as they were created? Any help is appreciated. -- Zhihui Zhang. Please visit http://www.freebsd.org

Re: What is FTW?

1999-06-10 Thread Zhihui Zhang
On Wed, 9 Jun 1999, Zhihui Zhang wrote: > > In the FAQ of FreeBSD 2.X, 13.12. Alternative layout policies for > directories, there is the following sentence: > > Most filesystems are created from archives that were created by a depth > first search (aka ftw). > > Wha

The clean and dirty buffer list of a vnode

1999-06-11 Thread Zhihui Zhang

What does VOP_FREEBLKS() do?

1999-06-19 Thread Zhihui Zhang
ted. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message

Jeroen Ruigrok/Asmodai's project

1999-06-22 Thread Zhihui Zhang
as much as you expect. I appreciate all the help I have received from you and others on this list. -- Zhihui Zhang. Please visit http://www.freebsd.org -- To Unsubscribe: send mail to majord

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 majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message

Implementation of mmap() in FreeBSD

1999-06-26 Thread Zhihui Zhang

Re: RE: Implementation of mmap() in FreeBSD

1999-06-28 Thread Zhihui Zhang
> > Because we can't realign the data in the pages without doing a buffer > copy. To force mmap() to align the data to the start of the page requires > it to allocate memory and copy the in-core disk cache to the new memory. > > This is extremely wasteful of cpu and memory. The

Re: RE: Implementation of mmap() in FreeBSD

1999-06-28 Thread Zhihui Zhang
On Mon, 28 Jun 1999, Matthew Dillon wrote: > :> it is extremely memory efficient. > : > :I guess you are talking about VMIO buffers where the pages are found and > :registered into the buffer header during allocbuf(). When we do I/O on > :VMIO buffers using conventional system call method, w

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 use

Overwrite an executable file that is running

1999-07-06 Thread Zhihui Zhang
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 k

Buffer emergence reserve

2001-04-18 Thread Zhihui Zhang
While looking at the code in vfs_bio.c, I notice the existence of low and high free buffer counters. The comments say they are there to give some special process like buf daemon access to emergence reserve. I just don't get the reason for having this emergence reserve. Do we allocate buffer in

Re: Buffer emergence reserve

2001-04-18 Thread Zhihui Zhang
Thanks! I am wondering whether the free VM page reserve has similar reason to exist, i.e., to clean dirty pages you need more pages. Probably not, that is for interrupt routines that can not block. On Wed, 18 Apr 2001, Alfred Perlstein wrote: > * Zhihui Zhang <[EMAIL PROTECTED]> [010

cv_wait() or sv_wait() in FreeBSD

2001-04-23 Thread Zhihui Zhang
Do we have conditional/synchronization variable support in FreeBSD? If not, is there any alternative mechanism to use in the kernel? Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

shared versus exclusive lock

2001-05-24 Thread Zhihui Zhang
According to my reading of kern_lock.c, it does support shared lock. However, we are still using LK_EXCLUSIVE mode more often than necessary. If I want to look up a directory or to read a buffer, I should be able to use the LK_SHARED lock. Right now, only few places I have found using LK_SHARED,

Confusion with mknod() and devfs

2001-06-21 Thread Zhihui Zhang
There is following comment inside ufs_mknod() which says /* * Remove inode, then reload it through VFS_VGET so it is * checked to see if it is an alias of an existing entry in * the inode cache. */ I really can not understand it. For each new disk inode, we call u

Re: Confusion with mknod() and devfs

2001-06-23 Thread Zhihui Zhang
On Fri, 22 Jun 2001, Terry Lambert wrote: > Zhihui Zhang wrote: > > According to the red daemon book, alias vnodes are used to make cache > > coherent (vp as a key). But getblk() stuff does not seem to check it. > > This makes me feel the code is there for historical r

Re: Confusion with mknod() and devfs

2001-06-24 Thread Zhihui Zhang
On Sat, 23 Jun 2001, Terry Lambert wrote: > Zhihui Zhang wrote: > > I think you got me wrong. I was talking about a device > > with more than one names. So we can have more than one > > vnode for the same device. (If there is more than one name > > to the same devi

trace a library call

2001-06-27 Thread Zhihui Zhang
Suppose I write a program that calls sbrk(). How can I trace into the function sbrk()? In this particular case, I want to know whether sbrk() calls the function in file lib/libstand/sbrk.c or sys/sbrk.S. Sometimes it is nice to see what system call is eventually called as well. I know dynamic lin

Re: does data overflow in pipes

2001-06-27 Thread Zhihui Zhang
I guess the kernel will block the process trying to write more data than that can be accommodated. Or if you are using non-blocking I/O, it will return an error. -Zhihui On Wed, 27 Jun 2001, Manas Bhatt wrote: > hi all, > pipes uses only direct blocks to store data. so > depending on the

Re: trace a library call

2001-06-28 Thread Zhihui Zhang
layers is really bad. -Zhihui On Thu, 28 Jun 2001, Terry Lambert wrote: > Zhihui Zhang wrote: > > > > Suppose I write a program that calls sbrk(). How can I trace into the > > function sbrk()? In this particular case, I want to know whether > > sbrk() calls the function in

Re: trace a library call

2001-06-28 Thread Zhihui Zhang
I am sorry. It turns out when the argument is zero, sbrk() does not enter into the kernel. If it does, it will return not supported. -Zhihui On Thu, 28 Jun 2001, Zhihui Zhang wrote: > > sbrk() is not supported in FreeBSD as a system call (see file > vm/vm_mmap.c). However, sb

Max DMA size

2000-07-06 Thread Zhihui Zhang
Can anyone tell me what factors determine the max DMA size (DMA counter on each controller or PCI bus related)? What is the typical max DMA size for a SCSI disk connected to a PCI bus? It seems to be much larger than MAXPHYS (128K). If so, does it mean we are not using full potential of DMA? So w

KLD, kernel threads, zone allocator

2000-07-17 Thread Zhihui Zhang
I am writing a KLD that gives me kernel fault each time I run 'ps' command after 'make unload'. The KLD has a system call to create several kernel threads by calling kthread_create(). During unload, I set flags to each threads so that they will call exit1() upon wakeup (sleep on a timeout). Be

memory type and its size

2000-07-20 Thread Zhihui Zhang
Does kernel memory of the same type (e.g., M_TEMP) must be allocated (using malloc()) with the same (range of) size? BTW, how to display mbuf cluster usages info. Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: memory type and its size

2000-07-21 Thread Zhihui Zhang
On Thu, 20 Jul 2000, Zhihui Zhang wrote: > > Does kernel memory of the same type (e.g., M_TEMP) must be allocated > (using malloc()) with the same (range of) size? BTW, how to display mbuf > cluster usages info. Thanks. A memory type can have memory blocks with different sizes.

Re: KLD, kernel threads, zone allocator

2000-07-21 Thread Zhihui Zhang
On Mon, 17 Jul 2000, Zhihui Zhang wrote: > > I am writing a KLD that gives me kernel fault each time I run 'ps' command > after 'make unload'. The KLD has a system call to create several kernel > threads by calling kthread_create(). During unload, I set flag

bridge driver and Yamaha YMF 724

2000-08-08 Thread Zhihui Zhang
Does 4.1-Release support YAMAHA PCI Audio Controller YMF 724? I have tried the suggestion given by man pcm without success. By the way, what is a card with bridge driver support and a PnP card as mentioned by man pcm? Thanks for your help. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTE

recompiling boot blocks & serial console

2000-08-10 Thread Zhihui Zhang
I want to set up a serial console on a freebsd 4.1 box. I follow the instructions at http://www.mostgraveconcern.com/freebsd/. I tried to do the following: # cd /sys/boot/i386/boo2 # make clean # make I got "cannot open ../btx/lib/crt0.o". What happened? Besides, I want to use another freeb

Re: recompiling boot blocks & serial console

2000-08-10 Thread Zhihui Zhang
On Thu, 10 Aug 2000, Mike Smith wrote: > > > > I want to set up a serial console on a freebsd 4.1 box. I follow the > > instructions at http://www.mostgraveconcern.com/freebsd/. I tried to do > > the following: > > Put > > -h > > in /boot.config. Now you have a serial console. Yes! Two m

Re: recompiling boot blocks & serial console

2000-08-10 Thread Zhihui Zhang
On Thu, 10 Aug 2000, Mike Smith wrote: > > On Thu, 10 Aug 2000, Mike Smith wrote: > > > > > > > > > > I want to set up a serial console on a freebsd 4.1 box. I follow the > > > > instructions at http://www.mostgraveconcern.com/freebsd/. I tried to do > > > > the following: > > > > > > Put >

Digital Technical Journal - zhihui

2000-08-15 Thread Zhihui Zhang
Kanad: I remember you subscribed some journal a while ago. Was it "digital technical journal?" I found two papers on VAXcluster filesytem design on No. 5, september 1987. If so and you happen to keep that issue, please borrow me for a while. Thanks. Regards, -Zhihui

kernel debugging on 4.1-release

2000-08-22 Thread Zhihui Zhang
I try to trace some system call using remote debugging and find something that I can not explain myself (the related source is ffs_write()): case 1: --- 443 if (object) (gdb) break 430 Breakpoint 6 at 0xc0289cea: file ../../ufs/ufs/ufs_readwrite.c, line 430. (gdb) c Cont

delayed write question

2000-08-24 Thread Zhihui Zhang
I am wondering what exactly will happen if a delayed write goes wrong. It seems to me that the kernel will just clear the error flag and mark the buffer as delayed write again. This gives the buffer a second chance. But how many chances at most a buffer can get before it is aborted. While thi

Where is PType in /stand/sysinstall defined?

2000-08-27 Thread Zhihui Zhang
In the FDISK-like menu of /stand/sysinstall, the PType (partition type) column is given values like 1,2,3,4,6. While the subtype field is well-defined (e.g., 0xa5 = freebsd), I can not find where the partition type is explained. I also tried PCguide in vain. Can somebody explain this to me? Is

tr command in DDB

2003-12-25 Thread Zhihui Zhang
Hi, I always like the command "db> tr 123" in DDB. Is there an equivalent command in gdb? Thanks. -Zhihui -- ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTEC

Re: vfs.vmiodirenable undocumented

2001-07-11 Thread Zhihui Zhang
100% agreed. In this particular vmiodirenable case, you can search the mailing list archive and will find that people have discussed it at least one year ago. Plus, if you still do not understand it, read the book "The design and Implementation of the 4.4 BSD Operating System". Anyway, when you

SPARE_USRSPACE

2001-07-17 Thread Zhihui Zhang
Can anyone tell me why FreeBSD has 256 bytes of spare space in the user area? Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Re: KLD Programming

2001-07-18 Thread Zhihui Zhang
Yes. But it is not easy. Look at code vfs_vnops.c. You can let a user process open a file and then push the file descriptor into kernel via a special system call. Search the mailing list archive and you will find discussions on how to add a new system call. -Zhihui On Wed, 18 Jul 2001, suid wro

Re: using syscalls in a module (stack problem ?)

2001-07-23 Thread Zhihui Zhang
Just out of curiosity, Linux's kernel stack is one page. Where in the kernel source code that says that we can have two pages instead of one page kernel stack? -Zhihui On Mon, 23 Jul 2001, Eugene L. Vorokov wrote: > > > I call this function with (curproc, PATH_MAX+1), and everything is fine >

Re: cluster size

2001-07-23 Thread Zhihui Zhang
You must be asking why the mbuf cluster size is chosen as 2048, right? It is probably a tradeoff between memory efficient and speed. -Zhihui On Mon, 23 Jul 2001, [iso-8859-1] vishwanath pargaonkar wrote: > Hi, > in freebsd can we change the cluster size from 2048 > bytes.If yes how can we do t

Re: using syscalls in a module (stack problem ?)

2001-07-23 Thread Zhihui Zhang
e/MYKERNEL/machine/param.h > > 101 #define UPAGES 2 /* pages of u-area */ > > Regards, > Weiguang > > >From: Zhihui Zhang <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED], "Eugene L. Vorokov" <[EMAIL PROTECTED]> > >CC: [EMAIL PRO

Re: cluster size

2001-07-25 Thread Zhihui Zhang
On Tue, 24 Jul 2001, Terry Lambert wrote: > Zhihui Zhang wrote: > > > Hi, > > > in freebsd can we change the cluster size from 2048 > > > bytes.If yes how can we do that? > > > do we have to configure in some file? > > > > You must be asking

Re: cluster size

2001-07-25 Thread Zhihui Zhang
I see. It has something to do with the power-of-two allocator we are using inside the kernel. -Zhihui On Wed, 25 Jul 2001, Bosko Milekic wrote: > > On Wed, Jul 25, 2001 at 01:51:51PM -0400, Zhihui Zhang wrote: > > > > > > On Tue, 24 Jul 2001, Terry Lambert wrote:

Re: cluster size

2001-07-27 Thread Zhihui Zhang
I thought doing a memory free is always safe in an interrupt context. Now it seems doing an allocation of memory is safe too. Does MCLGET() call vm_page_alloc() or malloc() eventually? If so, it might block. -Zhihui On Thu, 26 Jul 2001, Terry Lambert wrote: > Bosko Milekic wrote: > > > > Er,

Allocate a page at interrupt time

2001-08-01 Thread Zhihui Zhang
FreeBSD can not allocate from the PQ_CACHE queue in an interrupt context. Can anyone explain it to me why this is the case? Thanks, -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

Allocate a page at interrupt time

2001-08-03 Thread Zhihui Zhang
FreeBSD can not allocate from the PQ_CACHE queue in an interrupt context. Can anyone explain it to me why this is the case? Thanks, -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message

ata0-master: non aligned DMA transfer attempted

2001-08-24 Thread Zhihui Zhang
I write a program that writes into a raw device directly. Although the program runs OK, the system prints messages like: ata0-master: non aligned DMA transfer attempted What exactly happens here? Is there any problem in my program? Thanks. -Zhihui To Unsubscribe: send mail to [EMAIL PROTEC

Re: ata0-master: non aligned DMA transfer attempted

2001-08-26 Thread Zhihui Zhang
achieve this? -Zhihui On Fri, 24 Aug 2001, Julian Elischer wrote: > Zhihui Zhang wrote: > > > > I write a program that writes into a raw device directly. Although the > > program runs OK, the system prints messages like: > > > > ata0-master: non aligned DMA tr

Re: ata0-master: non aligned DMA transfer attempted

2001-08-27 Thread Zhihui Zhang
On Sun, 26 Aug 2001, Julian Elischer wrote: > Zhihui Zhang wrote: > > > > Thanks for your replay. I use gdb to find out that the buffer address is > > not 16-byte aligned. This leads to a question as to how to align a > > statically allocated data structure proper

  1   2   3   >