On sg_miter_next sg_miter_stop
Mulyadi Santosa
mulyadi.santosa at gmail.com
Wed Mar 16 00:50:22 EDT 2011
Hi..
On Wed, Mar 16, 2011 at 08:40, va stg2010 <va.storage2010 at gmail.com> wrote:
> Hi
> Can someone explain to me reason for the comment at line 332-333 of this code
> http://lxr.linux.no/#linux+v2.6.27.7/lib/scatterlist.c#L332
>
> comment is:
> " IRQ must stay disabled till @miter@ is stopped."
OK, is this the complete comment you referred?
"Context:
332 * IRQ disabled if SG_MITER_ATOMIC. IRQ must stay disabled till
333 * @miter@ is stopped. May sleep if !SG_MITER_ATOMIC."
well, then, my raw guess is, because it must be done atomically (when
asked to do so). Usually, atomic operation has tight relationship with
something that must be done in short time and/or must not be
interrupted by interrupt handler.
Since this is talking about scatter list, I could only guess few
example...perhaps in bio handling?
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
More information about the Kernelnewbies
mailing list