Re: [PATCH] relayfs redux, part 3 II - another comment

2005-02-05 Thread Andi Kleen
Another comment on relay_write fast pathing > +static inline unsigned relay_write(struct rchan *chan, > +const void *data, > +unsigned length) > +{ > + unsigned long flags; > + struct rchan_buf *buf = relay_get_buf(chan, smp_p

Re: [PATCH] relayfs redux, part 3

2005-02-04 Thread Andi Kleen
> The main reason would be that length would be 0 only if the buffers > were full, so the caller can suspend writing if it sees that, until > e.g. a daemon catches up. Would be? Is there actually any caller doing this? Better eliminate it and if someone really does it add a separate function tha

Re: [PATCH] relayfs redux, part 3

2005-02-04 Thread Tom Zanussi
Andi Kleen writes: > > > + > > + local_irq_save(flags); > > + if (unlikely(buf->offset + length > chan->subbuf_size)) > > + length = relay_switch_subbuf(buf, length); > > + memcpy(buf->data + buf->offset, data, length); > > + buf->offset += length; > > + local_irq_restore(fla

Re: [PATCH] relayfs redux, part 3

2005-02-04 Thread Andi Kleen
Just a minor comment, not reading it all. On Fri, Feb 04, 2005 at 02:17:37PM -0600, Tom Zanussi wrote: _write - write data into the channel > + * @chan: relay channel > + * @data: data to be written > + * @length: number of bytes to write > + * > + * Returns the number of bytes written, 0

Re: [PATCH] relayfs redux, part 3

2005-02-04 Thread Tom Zanussi
Christoph Hellwig writes: > First set of comments. Mostly ignores the actual filesystem sematics > bits, that'll come next. > > > > +# > > +# relayfs Makefile > > +# > > probably superflous comment ;-) > > > + mem = vmap(*page_array, *page_count, GFP_KERNEL, PAGE_KERNEL); > > Do

Re: [PATCH] relayfs redux, part 3

2005-02-04 Thread Tom Zanussi
Christoph Hellwig writes: > in the filesystem path especially relayfs_create_entry and the functions > called by it seem overly complex, probably because copying from ramfs > which allows namespace operations from userland. See the totally untested > code below for how it could be done more cl

Re: [PATCH] relayfs redux, part 3

2005-02-04 Thread Christoph Hellwig
in the filesystem path especially relayfs_create_entry and the functions called by it seem overly complex, probably because copying from ramfs which allows namespace operations from userland. See the totally untested code below for how it could be done more cleanly. What I really dislike is the c

Re: [PATCH] relayfs redux, part 3

2005-02-04 Thread Christoph Hellwig
First set of comments. Mostly ignores the actual filesystem sematics bits, that'll come next. > +# > +# relayfs Makefile > +# probably superflous comment ;-) > + mem = vmap(*page_array, *page_count, GFP_KERNEL, PAGE_KERNEL); Do you really need to vmap it, and eat up vmallocspace and TLB e

[PATCH] relayfs redux, part 3

2005-02-04 Thread Tom Zanussi
Hi, Here's the latest version of relayfs, against 2.6.10. It includes a bunch of cleanup and restructuring prompted by the previous round of comments, but the major change that people would care about would probably be the changes to the logging functions relay_write(), __relay_write(), and relay