linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] use correct wakeups in fs/pipe.c
@ 2002-10-19 18:12 Manfred Spraul
  2002-10-20 11:28 ` Hanna Linder
  0 siblings, 1 reply; 4+ messages in thread
From: Manfred Spraul @ 2002-10-19 18:12 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 153 bytes --]

wake_up_interruptible() and _sync() calls are reversed in pipe_read().

The attached patches only calls _sync if a schedule() call follows.

--
	Manfred

[-- Attachment #2: patch-pipefix --]
[-- Type: text/plain, Size: 638 bytes --]

--- 2.5/fs/pipe.c	Sat Oct 19 11:40:14 2002
+++ build-2.5/fs/pipe.c	Sat Oct 19 19:44:04 2002
@@ -109,7 +109,7 @@
 			break;
 		}
 		if (do_wakeup) {
-			wake_up_interruptible(PIPE_WAIT(*inode));
+			wake_up_interruptible_sync(PIPE_WAIT(*inode));
  			kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
 		}
 		pipe_wait(inode);
@@ -117,7 +117,7 @@
 	up(PIPE_SEM(*inode));
 	/* Signal writers asynchronously that there is more room.  */
 	if (do_wakeup) {
-		wake_up_interruptible_sync(PIPE_WAIT(*inode));
+		wake_up_interruptible(PIPE_WAIT(*inode));
 		kill_fasync(PIPE_FASYNC_WRITERS(*inode), SIGIO, POLL_OUT);
 	}
 	if (ret > 0)

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

* Re: [PATCH] use correct wakeups in fs/pipe.c
  2002-10-19 18:12 [PATCH] use correct wakeups in fs/pipe.c Manfred Spraul
@ 2002-10-20 11:28 ` Hanna Linder
  2002-10-20 23:49   ` Davide Libenzi
  0 siblings, 1 reply; 4+ messages in thread
From: Hanna Linder @ 2002-10-20 11:28 UTC (permalink / raw)
  To: Manfred Spraul, linux-kernel; +Cc: Hanna Linder

--On Saturday, October 19, 2002 20:12:42 +0200 Manfred Spraul <manfred@colorfullife.com> wrote:

> wake_up_interruptible() and _sync() calls are reversed in pipe_read().
> 
> The attached patches only calls _sync if a schedule() call follows.
> 

FYI. This patch fixes a hang on pipetest.c with the --epoll option.

Thanks!

Hanna


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

* Re: [PATCH] use correct wakeups in fs/pipe.c
  2002-10-20 23:49   ` Davide Libenzi
@ 2002-10-20 11:45     ` Hanna Linder
  0 siblings, 0 replies; 4+ messages in thread
From: Hanna Linder @ 2002-10-20 11:45 UTC (permalink / raw)
  To: Davide Libenzi; +Cc: Hanna Linder, Manfred Spraul, Linux Kernel Mailing List

--On Sunday, October 20, 2002 16:49:24 -0700 Davide Libenzi <davidel@xmailserver.org> wrote:

> On Sun, 20 Oct 2002, Hanna Linder wrote:
> 
>> --On Saturday, October 19, 2002 20:12:42 +0200 Manfred Spraul <manfred@colorfullife.com> wrote:
>> 
>> > wake_up_interruptible() and _sync() calls are reversed in pipe_read().
>> > 
>> > The attached patches only calls _sync if a schedule() call follows.
>> > 
>> 
>> FYI. This patch fixes a hang on pipetest.c with the --epoll option.
> 
> Hanna, I'm not sure if your port of the epoll pipe code on 2.5.44 is
> correct. That fix shouldn't affect epoll. Try the code I sent you
> yesterday or today, it working fine on my machine without the fix.

You are right. I had changed pipetest.c in all my debugging earlier
and used the original version of pipetest.c with your new patch and
Manfreds, which worked. I will be more carefull in the future.

Thanks.

Hanna



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

* Re: [PATCH] use correct wakeups in fs/pipe.c
  2002-10-20 11:28 ` Hanna Linder
@ 2002-10-20 23:49   ` Davide Libenzi
  2002-10-20 11:45     ` Hanna Linder
  0 siblings, 1 reply; 4+ messages in thread
From: Davide Libenzi @ 2002-10-20 23:49 UTC (permalink / raw)
  To: Hanna Linder; +Cc: Manfred Spraul, Linux Kernel Mailing List

On Sun, 20 Oct 2002, Hanna Linder wrote:

> --On Saturday, October 19, 2002 20:12:42 +0200 Manfred Spraul <manfred@colorfullife.com> wrote:
>
> > wake_up_interruptible() and _sync() calls are reversed in pipe_read().
> >
> > The attached patches only calls _sync if a schedule() call follows.
> >
>
> FYI. This patch fixes a hang on pipetest.c with the --epoll option.

Hanna, I'm not sure if your port of the epoll pipe code on 2.5.44 is
correct. That fix shouldn't affect epoll. Try the code I sent you
yesterday or today, it working fine on my machine without the fix.



- Davide



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

end of thread, other threads:[~2002-10-20 23:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-19 18:12 [PATCH] use correct wakeups in fs/pipe.c Manfred Spraul
2002-10-20 11:28 ` Hanna Linder
2002-10-20 23:49   ` Davide Libenzi
2002-10-20 11:45     ` Hanna Linder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).