All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Opening of blocking FIFOs not reliable?
@ 2005-08-14 10:15 Manfred Spraul
  2005-08-14 10:40 ` Teemu Koponen
  0 siblings, 1 reply; 4+ messages in thread
From: Manfred Spraul @ 2005-08-14 10:15 UTC (permalink / raw)
  To: Teemu Koponen; +Cc: linux-kernel

Teemu wrote:

>Opening a FIFO for WR_ONLY should release a previously blocked RD_ONLY 
>open. I suspect this is not guaranteed on a heavily loaded Linux box.
>  
>
Do you have a test case?
IIRC we had that bug, and it was fixed by adding PIPE_WCOUNTER:
PIPE_WRITERS counts the number of writers. This one is decreased during 
close(). PIPE_WCOUNTER counts how often a writer was seen. It's never 
decreased. Readers that wait for a writer wait until PIPE_WCOUNTER 
changes, they do not look at PIPE_WRITERS.

--
    Manfred

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Opening of blocking FIFOs not reliable?
@ 2005-08-13  3:18 Teemu Koponen
  2005-08-14  0:49 ` Alan Cox
  0 siblings, 1 reply; 4+ messages in thread
From: Teemu Koponen @ 2005-08-13  3:18 UTC (permalink / raw)
  To: linux-kernel

Hi,

Opening a FIFO for WR_ONLY should release a previously blocked RD_ONLY 
open. I suspect this is not guaranteed on a heavily loaded Linux box.

Consider fs/fifo.c (of 2.6.13-rc6-git4) and its wait_for_partner() and 
wake_up_partner() functions. I think wait_for_partner()'s while loop 
never exits, *iff* the writer, after opening the FIFO, closes it before 
the reader gets scheduled. Shouldn't the writer's open() block until 
the reader's open() is done?

Teemu

--


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

end of thread, other threads:[~2005-08-14 10:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-14 10:15 Opening of blocking FIFOs not reliable? Manfred Spraul
2005-08-14 10:40 ` Teemu Koponen
  -- strict thread matches above, loose matches on Subject: below --
2005-08-13  3:18 Teemu Koponen
2005-08-14  0:49 ` Alan Cox

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.