I'll clear this up too, as it was the gist of the entire slide
> The __raw_ versions of the functions are
> _not_ pure endianess, they are there for providing raw access (non
> ordered, CPU native byte order etc etc.), ie. it makes a lot of sense
> to use these on little endian boxes as well. These are the ones that
> are meant to be used carefully and with explicit memory barrier's.
I knew that but you're right it should be more clear
> Your description of spin_lock() isn't very clear, though I suspect the
> intention is (I asume the comments at the talk were). When inside an
> interrupt handler you use the non irqsave version since you are
> guaranteed that no interrupt will be generated on the particular CPU
> while running the interrupt handler. You want to use the irqsave one
> outside of interrupt context - so it's quite common to actually use
> both the irqsave and the non irqsave versions to grab the same
> lock. Now of course the trick is not having to use any spin locks at
> all ;-)
True enough. Most of this was covered in the verbal comments on the
slide.
> Semaphores: you should mention down_interruptible() as well and
> explain why it's good.
Need to get more familiar with semaphores first :)
> kmalloc(): basically it's limited to 128KB
>
> Last, you are missing a few important points that I think you should
> mention in a talk on writing portable code. Ie. #ifdef __alpha__ is a
> lot less portable than #ifdef __LITTLE_ENDIAN and
> #if (BITS_PER_LONG == 64).
>
> You may want to take a look at my kernel hacking tutorial slides at
> http://home.cern.ch/~jes/ols-kernel.ps.gz. They are a bit outdated
> since thats the version I used for my talk in Ottawa last July.
Thanks much for the reference, and the review.
Jeff
-- Jeff Garzik | Only so many songs can be sung Building 1024 | with two lips, two lungs, and MandrakeSoft, Inc. | one tongue.- 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.tux.org/lkml/