Re: Wait for console to become available, v3.2

2009-04-21 Thread Ingo Molnar
* David VomLehn dvoml...@cisco.com wrote: Parallelization to improve boot times has been successful enough that race conditions now exist between the init_post() open of /dev/console and initialization of the console device. When this occurs, opening /dev/console fails and any

Re: Wait for console to become available, v3.2

2009-04-21 Thread David Brownell
On Monday 20 April 2009, Ingo Molnar wrote: The proper approach would be to use one of the async_synchronize*() facilities in kernel/async.c to properly order the opening of the console with device init. Stepping back a moment from how to make sure what is agreed on. I think I see three

Re: Wait for console to become available, v3.2

2009-04-21 Thread Arjan van de Ven
On Tue, 21 Apr 2009 08:43:46 +0200 Ingo Molnar mi...@elte.hu wrote: The proper approach would be to use one of the async_synchronize*() facilities in kernel/async.c to properly order the opening of the console with device init. Unfortunately this is not the answer. First of all, USB does

Re: Wait for console to become available, v3.2

2009-04-21 Thread Ingo Molnar
* Arjan van de Ven ar...@infradead.org wrote: On Tue, 21 Apr 2009 08:43:46 +0200 Ingo Molnar mi...@elte.hu wrote: The proper approach would be to use one of the async_synchronize*() facilities in kernel/async.c to properly order the opening of the console with device init.

Re: Wait for console to become available, v3.2

2009-04-21 Thread Alan Stern
On Tue, 21 Apr 2009, Jamie Lokier wrote: Ingo Molnar wrote: * Arjan van de Ven ar...@infradead.org wrote: But more importantly... USB *CANNOT* do this fundamental operation. USB does not have the capability to know when you have seen all devices that are connected. Devices just show

Re: Wait for console to become available, v3.2

2009-04-21 Thread Alan Cox
+config PRINTK_CONSOLE_WAIT + int Default number of milliseconds to wait for console device + default 1000 Does this only delay init during a console-less bootup - or are there other later apps that might trigger the delay? The console proper needs to be event based not

Re: [ltt-dev] [PATCH] nfs: add support for splice writes

2009-04-21 Thread Christoph Hellwig
On Mon, Apr 20, 2009 at 09:17:23PM +0530, Suresh Jayaraman wrote: +static ssize_t nfs_file_splice_write(struct pipe_inode_info *pipe, + struct file *filp, loff_t *ppos, + size_t count, unsigned int flags) +{ + struct dentry

Re: Wait for console to become available, v3.2

2009-04-21 Thread David VomLehn
On Tue, Apr 21, 2009 at 04:26:27PM +0200, Ingo Molnar wrote: * Jamie Lokier ja...@shareable.org wrote: Ingo Molnar wrote: ... What i'm saying is: instead of wait 2000 msecs, maybe it works out hack, there should be a proper sleep+event based approach to the same. With perhaps a

Re: Wait for console to become available, v3.2

2009-04-21 Thread David Woodhouse
On Tue, 2009-04-21 at 00:13 -0700, David Brownell wrote: Stepping back a moment from how to make sure what is agreed on. I think I see three scenarios here: - Classic PC or server, where there's a meaningful console; - Deeply embedded systems, where there isn't; - Development

Re: Wait for console to become available, v3.2

2009-04-21 Thread David VomLehn
On Tue, Apr 21, 2009 at 06:11:11PM +0100, David Woodhouse wrote: ... The kernel output is going to be spewed when a console registers with CON_PRINTBUFFER anyway, and if we printk a warning about userspace console output being lost, that ought to be good enough to notify the user that

Re: [ltt-dev] [PATCH] nfs: add support for splice writes

2009-04-21 Thread Trond Myklebust
On Tue, 2009-04-21 at 10:48 -0400, Christoph Hellwig wrote: On Mon, Apr 20, 2009 at 09:17:23PM +0530, Suresh Jayaraman wrote: +static ssize_t nfs_file_splice_write(struct pipe_inode_info *pipe, +struct file *filp, loff_t *ppos, +

Re: Wait for console to become available, v3.2

2009-04-21 Thread Linus Torvalds
On Tue, 21 Apr 2009, David Woodhouse wrote: We can provide un-hooked-up /dev/console though. Rather than just failing to open it, why can't we make __tty_open() give you a dummy tty driver which is basically equivalent to /dev/null? And then 'replace' it with the real console driver

Re: Wait for console to become available, v3.2

2009-04-21 Thread David Woodhouse
On Tue, 2009-04-21 at 10:29 -0700, David VomLehn wrote: On Tue, Apr 21, 2009 at 06:11:11PM +0100, David Woodhouse wrote: ... The kernel output is going to be spewed when a console registers with CON_PRINTBUFFER anyway, and if we printk a warning about userspace console output being lost,

Re: Wait for console to become available, v3.2

2009-04-21 Thread Linus Torvalds
On Tue, 21 Apr 2009, David VomLehn wrote: What in the world are users going to do when they see a message about output being lost? There is no way to recover the data and no way to prevent it in the future. I don't think this is a good approach. Sure there is. The console messages are

Re: Wait for console to become available, v3.2

2009-04-21 Thread David VomLehn
Tue, Apr 21, 2009 at 10:37:41AM -0700, Linus Torvalds wrote: On Tue, 21 Apr 2009, David VomLehn wrote: What in the world are users going to do when they see a message about output being lost? There is no way to recover the data and no way to prevent it in the future. I don't think

Re: Wait for console to become available, v3.2

2009-04-21 Thread Alan Stern
On Tue, 21 Apr 2009, David VomLehn wrote: If somebody would like to suggest a programming interface (a waitqueue perhaps?) by which the USB hub driver could send a notification when it becomes idle, I could implement it. I actually started the USB console stuff with exactly this

Re: Wait for console to become available, v3.2

2009-04-21 Thread Alan Cox
failing to open it, why can't we make __tty_open() give you a dummy tty driver which is basically equivalent to /dev/null? And then 'replace' it with the real console driver if/when that later gets registered? The latter will be a high-caffeine job, but surely not impossible? This

Re: [ltt-dev] [PATCH] nfs: add support for splice writes

2009-04-21 Thread Chuck Lever
On Apr 21, 2009, at 1:35 PM, Trond Myklebust wrote: On Tue, 2009-04-21 at 10:48 -0400, Christoph Hellwig wrote: On Mon, Apr 20, 2009 at 09:17:23PM +0530, Suresh Jayaraman wrote: +static ssize_t nfs_file_splice_write(struct pipe_inode_info *pipe, +struct file

Re: Wait for console to become available, v3.2

2009-04-21 Thread David VomLehn
On Tue, Apr 21, 2009 at 03:09:52PM -0400, Alan Stern wrote: On Tue, 21 Apr 2009, David VomLehn wrote: If somebody would like to suggest a programming interface (a waitqueue perhaps?) by which the USB hub driver could send a notification when it becomes idle, I could implement it.

Re: Wait for console to become available, v3.2

2009-04-21 Thread David VomLehn
On Tue, Apr 21, 2009 at 08:25:01PM +0100, Alan Cox wrote: Anybody want to try it? Just make it ignore any IO if there are no registered consoles. The patch shouldn't even be all that big, I suspect. It will work, but on its own it won't actually fix the problem people have, which is

Re: Wait for console to become available, v3.2

2009-04-21 Thread David VomLehn
By now, pretty much everone is probably up to speed on what the USB folks are telling us: There is no way to avoid using some sort of timeout to decide whether the console is ever going to appear. So: 1. We want the minimum timeout possible so that headless systems will