[ENBD] nbd with an SMP kernel?
Peter T. Breuer
ptb@it.uc3m.es
Fri, 13 Oct 2000 02:24:52 +0200 (MET DST)
"A month of sundays ago leonid@hmdc-admin.fas.harvard.edu wrote:"
> is anybody using nbd on an SMP machine? I've tried both 2.4.14 and 2.2.28,
> but w/out much luck. Everything works fine under a single-cpu kernel.
Check the list archives. (Apparently) it works fine. As you mention, you
just have to compile with __SMP__. I note that the current nbd
makefiles have
ifneq ($(SMP),0)
EXTRA_CFLAGS+= -D__SMP__
endif
so "make SMP=1" would do the trick.
> In the v.2.4.14 distribution the main Makefile doesn't seem to pass the
> -D__SMP__ flag to the Makefile that compiles nbd.o; it looks like it also
> needs -D__BOOT_KERNEL_SMP -- without these flags the module compiles with
I don't think the latter is needed, at least not if nbd is a module!
> kernel_version set to (in my case) 2.2.16-3 instead of 2.2.16-3smp, so it
This must be a makefile artifact. I don't make any special effort to treat
kernel_version specially, so it must nbe treated like anything else in
the kernel makefiles.
> can't be loaded under the SMP kernel. Even with these issues resolved, I
> can't insmod the module -- I get tons of "unresolved symbol" messages. The
You cannot get those messages if you _really_ compiled with the flags you
say you used. Think about it .. the only thing nbd is compiled against
is the kernel. It doesn't get its symbols from anywhere else. If when
you try and link it to the kernel after compiling it against the same
kernel sources then everybody must be referring to the same symbol
names. The only thing I can think of is that you have MODVERSIONS
defined in the kernel and not in nbd.
> client doesn't seem to work with the nbd.o module that comes with the
> RedHat kernel distribution.
Well, it wouldn't! The two have nothing to do with each other.
It would be helpful to mention kernel version, nbd version, compiler
version and principal kernel architecture options. A snap of the
nbd.o compile line produced by the makefile, and one from an "ordinary"
module compile will also be useful.
Peter