Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-09 Thread Jeff Garzik
So my radical ultra tired rant o the week... Rather than adding sys_indirect and syslets as is, * admit that this is beginning to look like a new ABI. explore the freedoms that that avenue opens... * (even more radical) I wonder what a tiny, SANE register-based bytecode interface might loo

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-09 Thread Rusty Russell
On Thursday 10 January 2008 09:58:10 Linus Torvalds wrote: > On Thu, 10 Jan 2008, Rusty Russell wrote: > > I'd have to read his original statement, but eventfd doesn't build up > > state, so I think it qualifies. > > How about you guys battle it out by giving an example program usign the > interfac

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-09 Thread Zach Brown
Linus Torvalds wrote: > > On Thu, 10 Jan 2008, Rusty Russell wrote: >> I'd have to read his original statement, but eventfd doesn't build up state, >> so I think it qualifies. > > How about you guys battle it out by giving an example program usign the > interface? > > Here's a favourite really

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-09 Thread Linus Torvalds
On Wed, 9 Jan 2008, Linus Torvalds wrote: > > Try this with and without a "echo 3 > /proc/sys/vm/drop_caches" in > between. Both are real and relevant usage cases, I think. Side note, for me the difference on my home directory for the cached vs uncached case is 5 seconds vs 5 minutes. I like

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-09 Thread Davide Libenzi
On Thu, 10 Jan 2008, Rusty Russell wrote: > On Thursday 10 January 2008 05:16:57 Zach Brown wrote: > > > The latter. A ring is optimal for processing a huge number of requests, > > > but if you're really going to be firing off syslet threads all over the > > > place you're not going to be optimal

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-09 Thread Linus Torvalds
On Thu, 10 Jan 2008, Rusty Russell wrote: > > I'd have to read his original statement, but eventfd doesn't build up state, > so I think it qualifies. How about you guys battle it out by giving an example program usign the interface? Here's a favourite really simple load of mine: - do the e

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-09 Thread Rusty Russell
On Thursday 10 January 2008 05:16:57 Zach Brown wrote: > > The latter. A ring is optimal for processing a huge number of requests, > > but if you're really going to be firing off syslet threads all over the > > place you're not going to be optimal anyway. And being able to point the > > return va

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-09 Thread Zach Brown
>> Or do you mean the syscall return value ending up in the userspace >> completion event ring? That's mostly about being able to wait for >> pending syslets to complete. > > The latter. A ring is optimal for processing a huge number of requests, but > if you're really going to be firing off s

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-08 Thread Rusty Russell
On Wednesday 09 January 2008 14:00:04 Zach Brown wrote: > > Firstly, why not just specify an address for the return value and be > > done with it? This infrastructure seems overkill, and you can always > > extend later if required. > > Sorry, which infrastructure? > > Providing the function an

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-08 Thread Zach Brown
> Firstly, why not just specify an address for the return value and be done > with it? This infrastructure seems overkill, and you can always extend later > if required. Sorry, which infrastructure? Providing the function and stack to return to? Sure, I could certainly entertain the idea

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2008-01-08 Thread Rusty Russell
On Friday 07 December 2007 10:20:18 Zach Brown wrote: > The indirect syslet arguments specify where to store the completion and > what function in userspcae to return to once the syslet has been executed. > The details of how we pass the indirect syslet arguments needs help. Hi Zach, Firstly

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2007-12-07 Thread Zach Brown
>> +/* >> + * syslet_ring doesn't have any kernel-side storage. Userspace allocates >> them >> + * in their address space and initializes their fields and then passes them >> to >> + * the kernel. >> + * >> + * These hashes provide the kernel-side storage for the wait queues which >> + * sys_sy

Re: [PATCH 5/6] syslets: add generic syslets infrastructure

2007-12-07 Thread Evgeniy Polyakov
Hi Zach. On Thu, Dec 06, 2007 at 03:20:18PM -0800, Zach Brown ([EMAIL PROTECTED]) wrote: > +/* > + * XXX todo: > + * - do we need all this '*cur = current' nonsense? > + * - try to prevent userspace from submitting too much.. lazy user ptr read? > + * - explain how to deal with waiting threads

[PATCH 5/6] syslets: add generic syslets infrastructure

2007-12-06 Thread Zach Brown
The indirect syslet arguments specify where to store the completion and what function in userspcae to return to once the syslet has been executed. The details of how we pass the indirect syslet arguments needs help. We parse the indirect syslet arguments in sys_indirect() before we call the given