[ENBD] two questions
Peter T. Breuer
ptb@it.uc3m.es
Thu, 15 Feb 2001 04:12:25 +0100 (MET)
"A month of sundays ago Wang Gang wrote:"
> > 1) readahead
> Is it done by file system?
It's done somewhere very generic in the kernel. I don't know where.
There is an array rahead[] that contains the number of sectors to
read ahead for every block device major.
> > 3) request merging
> How to let driver do mergeing? I use écho "merge_requests=1" >
In the 2.4 kernel, it is sufficient to let the kernel plug the device.
This will happen if nbd does not disable it - but it does presently.
Look in the init_module section and you will see a couple of calls, one
commented. The call that is not commented installs a do-nothing
function as the kernels plugging function for nbd. Commenting that
call will leave the default in place, which does do plugging.
The problem with the default is that it does unplugging on the disk
taskqueue, which is dangerous. The commented call in init_module
installs an unplugging function that does unplugging on the scheduler
taskqueue instead. But that seemed to stick when I tried it. Unplugging
on the scheduler should give time for the userspace daemon to run.
> /proc/nbdinfo'.
> Is it right? But it seems that mergeing help nothing. I used iozone to
It used to cause horrible death in 2.2. Has it stopped doing that?
> do the
> test. Did result relate to it? Do you know there is any tool that test
> "raw disk
> "?
I use bonnie.
Oh .. in 2.4 you may find that calls to /dev/nda (or hda !) are
unbuffered. Calling to /dev/nda1 should restore buffering.
> In addition, I can't open more than 4 ports when use ENBD. The error is
> no
> available slot. Do you know why?
I have definitely run with 8 channels open per device in at least some
versions. I will introduce a test for that into the regression suite.
Peter