[OpenAFS-devel] Compile-Time Options & UP/SMP

Jason McCormick jasonmc@cert.org
Tue, 28 Nov 2006 21:52:16 -0500


  We use a locally-maintained specfile for building AFS on Red Hat and
Fedora for a variety of reasons.  With Fedora 6 (and I'm guessing AS5
but I'm not sure) there's no more differentiation between uniprocssor
and smp kernels.  This brings up the question of what kind of options to
pass to 'make dist_only_libafs' and if options we've been carrying
around for years are still valid.  I was hoping someone could tell me if
I'm carrying around options from the <= 1.2 days that are long obsolete.

  When I go to build a libafs module, I'm essentially looping over every
viable kernel in /lib/modules and then building libafs based on if I
think it's a uniproc or smp kernel.  The logic is somewhat convoluted
but it's always "just worked" for both Linux 2.4 and 2.6.  I'm basically
doing the following:

PrintRedhatKernelFix $arch $mp src/config/redhat-fix.h
rm -f config.cache
./configure --with-linux-kernel-headers=%{kbase}$vers%{kend} \
	$config_opts
make dest_only_libafs LOCAL_SMP_DEF=-DREDHAT_FIX  \
        LINUX_MODULE_NAME="-$arch" MPS=$mp

With all of the following variables defined:

  $arch is one of i686 or x86_64
  %{kbase}$vers%{end} ends up being a proper /lib/modules/XXX/ path
  $mp is either SP or MP depending on if the kernel is UP or SMP.
  $config_opts aren't anything exciting, just --enable-transarc-paths
    and a few other standard items.  If it's a Linux 2.4 machine,
    I'm also setting --enable-redhat-buildsys which only seems to work
    on Linux 2.4.

The PrintRedhatKernelFix emits this convoluted .h file that predates my
work on our AFS package so I've just kept it around.  It's end goal in
life seems to be "Kernel configuration file for Red Hat Kernels".  I'm
guessing this is unnecessary, but I'd like feedback.  Is
--enable-redhat-buildsys necessary?

With the combined Kernel in FC6, what's the right strategy?  I'm in the
process of testing "Everything is an SMP module" but I don't have any
uniprocessor FC6 boxes to really test this theory.  Is the MPS= variable
even still necessary or does autoconf do the right things?

TIA,
Jason