RE: AMI MegaRAID beta release

Jeffrey Jones (jeffreyj@ami.com)
Mon, 17 Aug 1998 12:02:59 -0400


Thanks, I'm in the process of fixing the mistakes you pointed out...

> > +#define ENQUEUE(obj,type,list,next) \
> > +{ type **node; long cpuflag; \
> > + save_flags(cpuflag); cli(); \
> > + for(node=&(list); *node; node=(type **)&(*node)->##next); \
> > + (*node) = obj; \
> > + (*node)->##next = NULL; \
> > + restore_flags(cpuflag); \
> > +};
> > +
> > +#define DEQUEUE(obj,type,list,next) \
> > +{ long cpuflag; \
> > + save_flags(cpuflag); cli(); \
> > + if ((obj=list) != NULL) {\
> > + list = (type *)(list)->##next; \
> > + } \
> > + restore_flags(cpuflag); \
> > +};
>
> Do you really need a global cli() here? IMHO a IRQ-safe spinlock would
> be
> sufficient and it would give better performance on SMP systems.
>
I will look into using spinlocks, but I notice they are only defined in the
2.1
kernels. My primary concern so far was to get a working driver out that
our customers could use with an out-of-the-box Linux distribution,
without having to otherwise upgrade their kernel. I should have mentioned
in
my first post that SMP wasn't supported yet. That's the next thing on my
list to add though. Can you point me toward a reference that explains when
which locks can and should be used?

-
Jeff L Jones (jeffreyj@ami.com)
RAID SW Dev, American Megatrends Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html