All of lore.kernel.org
 help / color / mirror / Atom feed
* Priority inversion when using MTD
@ 2007-05-17 13:20 Sekhar Nori
  2007-05-17 13:52 ` David Woodhouse
  0 siblings, 1 reply; 3+ messages in thread
From: Sekhar Nori @ 2007-05-17 13:20 UTC (permalink / raw)
  To: linux-mtd

Hi,

I have a high priority SCHED_FIFO task which runs out of a squashfs file system.
When this process needs to fetch a page from the flash (due to demand paging),
it is sometimes made to wait for another low priority SCHED_NORMAL
task which is doing an erase on some other mtd partition.

This helps other middle priority processes have a free run causing a
priority inversion issue.

The get_chip function in cfi_cmdset_0001.c uses a per chip wait queue
for all processes which need to wait for chip access.

Is there any way to avoid this scenario? Any help/pointers would be appreciated.

Thanks,
Sekhar Nori.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Priority inversion when using MTD
  2007-05-17 13:20 Priority inversion when using MTD Sekhar Nori
@ 2007-05-17 13:52 ` David Woodhouse
  2007-05-17 16:36   ` Sekhar Nori
  0 siblings, 1 reply; 3+ messages in thread
From: David Woodhouse @ 2007-05-17 13:52 UTC (permalink / raw)
  To: Sekhar Nori; +Cc: linux-mtd

On Thu, 2007-05-17 at 18:50 +0530, Sekhar Nori wrote:
> I have a high priority SCHED_FIFO task which runs out of a squashfs file system.
> When this process needs to fetch a page from the flash (due to demand paging),
> it is sometimes made to wait for another low priority SCHED_NORMAL
> task which is doing an erase on some other mtd partition.
 ...
> Is there any way to avoid this scenario? Any help/pointers would be appreciated.

mlockall(2)

-- 
dwmw2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Priority inversion when using MTD
  2007-05-17 13:52 ` David Woodhouse
@ 2007-05-17 16:36   ` Sekhar Nori
  0 siblings, 0 replies; 3+ messages in thread
From: Sekhar Nori @ 2007-05-17 16:36 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linux-mtd

On 5/17/07, David Woodhouse <dwmw2@infradead.org> wrote:
> On Thu, 2007-05-17 at 18:50 +0530, Sekhar Nori wrote:
> > I have a high priority SCHED_FIFO task which runs out of a squashfs file system.
> > When this process needs to fetch a page from the flash (due to demand paging),
> > it is sometimes made to wait for another low priority SCHED_NORMAL
> > task which is doing an erase on some other mtd partition.
>  ...
> > Is there any way to avoid this scenario? Any help/pointers would be appreciated.
>
> mlockall(2)

But doing so for all SCHED_FIFO tasks would make the system run out of memory :(

-
Sekhar Nori

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-17 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-17 13:20 Priority inversion when using MTD Sekhar Nori
2007-05-17 13:52 ` David Woodhouse
2007-05-17 16:36   ` Sekhar Nori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.