[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libblock performance question
- Date: Mon, 14 Oct 2002 07:16:17 -0500
- From: joel.sherrill at OARcorp.com (Joel Sherrill)
- Subject: libblock performance question
Till Straumann wrote:
> I am thinking about using libblock for implementing an NFS client.
> However, I am a little bit concerned about libblock using task
> preemption disabling. Code that is executed with preemption
> disabled is not trivially short - therefore, I am a bit concerned that
> using libblock might degrade dispatching latency for high priority tasks
> (who possibly are not using a FS or libblock whatsoever).
> Can anybody resolve my doubts?
I didn't do any extensive algorithmic analysis but I don't see anything
particularly alarming. There were a handful of DISABLE_PREEMPTION
macro invocations in bdbuf.c. Some protected AVL tree operations which
should not be O(n) but more like O(log2 n) so that isn't very bad.
You can have 255 blocks to manage and still only do 8 "operations."
The other path seems to be freeing buffers and that is no worse
than any RTEMS internal critical section -- chain append + semaphore
Do you see any O(n) loops?
Looking at this, I don't see why DISABLE_PREEMPTION couldn't be
replaced with a mutex though.
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985