Re: [PATCH] Update to libaio?

2008-01-08 Thread Sarah Sharp
I think the Debian package maintainer should also be involved in this.

I would love to see preadv and pwritev go into libaio, as they will be useful
for userspace USB driver developers to interface with usbfs2
(http://wiki.cs.pdx.edu/usb/usbfs2.html).  I do have a few more issues with the
libaio-dev package.

Currently, the Debian libaio-dev package includes man pages like aio_read and
aio_write, which are for POSIX aio.  The io_submit pages refer to the kernel
API, not the libaio wrappers, so the variable types are incorrect.

Also, the libaio example in the io manpage doesn't compile against current
libaio.  Jamey Sharp wrote a very small example program that could replace the
example.  It can be found at:
http://minilop.net/svn/jamey/trunk/test/aio/
(Although it doesn't have a license header currently, Jamey told me it's BSD
licensed.)

I'll submit a patch for these corrections as soon as Jamey gives his permission
to use his example and adds a license header.

Sarah Sharp

On Tue, Jan 08, 2008 at 05:02:14PM +1100, Rusty Russell wrote:
> I recently tried to use libaio (0.3.106), and discovered it didn't have
> eventfd support.  Or preadv/pwritev support.  And the testsuite didn't
> compile.  Or work.
> 
> Anyway, it's shipped by the distros, so I figure it's worth patching.
> I'm cc'ing Ben in the hope he's still maintaining it.  If not I'll
> find a home somewhere for it.
> 
> (Thanks for Jeff's feedback on the first version of this patch).
> 
> Cheers,
> Rusty.
> 
> diff -r 3a023dc4e63a ChangeLog
> --- a/ChangeLog   Tue Jan 08 14:38:53 2008 +1100
> +++ b/ChangeLog   Tue Jan 08 17:00:53 2008 +1100
> @@ -1,3 +1,14 @@ 0.4.0
> +rusty-v1
> + - Make tests compile again on modern systems (warnings + -Werror)
> + - Add 'make partcheck' and don't require manual setup for testing.
> + - Change test harness to compile against this dir, not global install
> + - Fix 5.t for archs where PROT_WRITE mappings are readable.
> + - Allow sending of SIGXFSZ on aio over limits
> + - Explicitly specify bash for runtests.sh
> + - Put deprecating comments on never-merged io_prep_poll
> + - Add io_prep_preadv and io_prep_pwritev
> + - Add eventfd support (io_set_eventfd).
> +
>  0.4.0
>   - remove libredhat-kernel
>   - add rough outline for man pages
> diff -r 3a023dc4e63a Makefile
> --- a/MakefileTue Jan 08 14:38:53 2008 +1100
> +++ b/MakefileTue Jan 08 17:00:53 2008 +1100
> @@ -17,6 +17,11 @@ install:
>  install:
>   @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) 
> libdir=$(libdir)
>  
> +check:
> + @$(MAKE) -C harness check
> +
> +partcheck: all
> + @$(MAKE) -C harness partcheck
>  
>  clean:
>   @$(MAKE) -C src clean
> diff -r 3a023dc4e63a harness/Makefile
> --- a/harness/MakefileTue Jan 08 14:38:53 2008 +1100
> +++ b/harness/MakefileTue Jan 08 17:00:53 2008 +1100
> @@ -1,37 +1,56 @@
>  # foo.
>  TEST_SRCS:=$(shell find cases/ -name \*.t | sort -n -t/ -k2)
> -PROGS:=$(patsubst %.t,%.p,$(TEST_SRCS))
> +EXTRAPROGS:=cases/8.p cases/10.p
> +PARTPROGS:=$(filter-out $(EXTRAPROGS), $(patsubst %.t,%.p,$(TEST_SRCS)))
> +PROGS:=$(PARTPROGS) $(EXTRAPROGS)
>  HARNESS_SRCS:=main.c
>  # io_queue.c
>  
> -CFLAGS=-Wall -Werror -g -O -laio
> +CFLAGS=-Wall -Werror -I../src -g -O
>  #-lpthread -lrt
>  
>  all: $(PROGS)
>  
>  $(PROGS): %.p: %.t $(HARNESS_SRCS)
> - $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c
> + $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c ../src/libaio.a
>  
>  clean:
>   rm -f $(PROGS) *.o runtests.out rofile wofile rwfile
>  
>  .PHONY:
>  
> -testdir/rofile: .PHONY
> +testdir/rofile: testdir .PHONY
>   rm -f $@
>   echo "test" >$@
>   chmod 400 $@
>  
> -testdir/wofile: .PHONY
> +testdir/wofile: testdir .PHONY
>   rm -f $@
>   echo "test" >$@
>   chmod 200 $@
>  
> -testdir/rwfile: .PHONY
> +testdir/rwfile: testdir .PHONY
>   rm -f $@
>   echo "test" >$@
>   chmod 600 $@
>  
> -check: $(PROGS) testdir/rofile testdir/rwfile testdir/wofile
> - ./runtests.sh $(PROGS)
> +testdir testdir.enospc testdir.ext2:
> + mkdir $@
>  
> +root: .PHONY
> + @if [ `id -u` -ne 0 ]; then echo Need root for check, try partcheck 
> >&2; exit 1; fi
> +
> +partcheck: $(PARTPROGS) testdir/rofile testdir/rwfile testdir/wofile
> + ./runtests.sh $(PARTPROGS)
> +
> +ext2.img:
> + dd if=/dev/zero bs=1M count=10 of=$@
> + mke2fs -F -b 4096 $@
> +
> +extracheck: $(EXTRAPROGS) root testdir.ext2 testdir.enospc ext2.img
> + mount -o loop -t ext2 ext2-enospc.img testdir.enospc
> + ./runtests.sh cases/10.p; ret=$$?; umount testdir.enospc; exit $$ret
> + mount -o loop -t ext2 ext2.img testdir.ext2
> + ./runtests.sh cases/8.p; ret=$$?; umount testdir.ext2; exit $$ret
> +
> +check: partcheck extracheck 
> diff -r 3a023dc4e63a harness/cases/12.t
> --- a/harness/cases/12.t  Tue Jan 08 14:38:53 2008 +1100
> +++ b/harness/cases/12.t  Tue

Re: [PATCH] Update to libaio?

2008-01-08 Thread Zach Brown
Sarah Sharp wrote:
> I think the Debian package maintainer should also be involved in this.
> 
> I would love to see preadv and pwritev go into libaio, as they will be useful
> for userspace USB driver developers to interface with usbfs2
> (http://wiki.cs.pdx.edu/usb/usbfs2.html).  I do have a few more issues with 
> the
> libaio-dev package.

*I* would love for people to stop using libaio. It's not a library, in
that it doesn't isolate applications from the system ABI.  It's no more
than a bunch of inline functions.  It was a mistake, in my opinion, but
here we are.

I happen to hate it because it's silly assertion on the ring cookie is
literally the *only* use of the mmaped ring that I know if.  If it
weren't for that, we might stand a chance of getting rid of the ring.

- z

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Benjamin LaHaise
On Tue, Jan 08, 2008 at 02:19:55PM -0800, Zach Brown wrote:
> 
> > What's the driving need to rip out functionality?
> 
> Well, in this case of the ring it's an irritation to have to massage the
> tracking of events into the ring format when you, say, back the aio
> implementation with syslets.  If it were just queueing up results for
> io_getevents(), which can lock in the kernel, we'd have more freedom.
> 
> It's a nit, don't get me wrong.

Then why not massage the ring into what you need from a ring buffer?  Come up 
with some real design criteria that are to be satisfied so some real 
direction can be had in discussions.

> > Why not actually submit 
> > some more in kernel implementations of aio and then evaluate if the api 
> > really needs to be ripped out or not (and use syslets or whatever to 
> > implement 
> > them)?
> 
> Don't ask me, ask the subsystem maintainers who have not chosen to do
> this over the last N years.

Want a patch that spews "->read() is not async" for every device in the 
kernel?  That would get attention.  As it stands today, nobody cares for 
functionality that they aren't directly involved with and which does not 
block development.  Patches have been bounced around doing aio via threads 
but almost always got dropped for some reason or other, I just don't have 
the time to carry them around indefinately.

-ben
-- 
"Time is of no importance, Mr. President, only life is important."
Don't Email: <[EMAIL PROTECTED]>.

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Benjamin LaHaise
On Tue, Jan 08, 2008 at 11:23:22AM -0800, Zach Brown wrote:
> I happen to hate it because it's silly assertion on the ring cookie is
> literally the *only* use of the mmaped ring that I know if.  If it
> weren't for that, we might stand a chance of getting rid of the ring.

What's the driving need to rip out functionality?  Why not actually submit 
some more in kernel implementations of aio and then evaluate if the api 
really needs to be ripped out or not (and use syslets or whatever to implement 
them)?  The api has room for changing how the rings are implemented -- that's 
what compat and incompat bits are for.

-ben
-- 
"Time is of no importance, Mr. President, only life is important."
Don't Email: <[EMAIL PROTECTED]>.

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Jeff Moyer
Rusty Russell <[EMAIL PROTECTED]> writes:

> On Wednesday 09 January 2008 06:07:51 Jeff Moyer wrote:
>> I've been keeping a copy on rhlinux.redhat.com.  You can access it
>> via:
>>
>>   cvs -d :pserver:[EMAIL PROTECTED]:/usr/local/CVS login  # no
>> password cvs -d :pserver:[EMAIL PROTECTED]:/usr/local/CVS co
>> libaio
>
> Excellent!  I'll feed you patches from now on then, should I find anything 
> else.
>
>> When I'm happy with the regression tests (they
>> don't all pass for me on 2.6.24-rc7), I'll roll a new version and
>> build it for Fedora.
>
> Did you see my two kernel patches to fix them?  Attached for your 
> convenience...

I did, thank you.  The remaining failures were in the ENOSPC test.
For some reason, the filler filled 1024 bytes too much of the file
system.  Did this test succeed for you?

Cheers,

Jeff

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


[PATCH] Update to libaio?

2008-01-08 Thread Rusty Russell
I recently tried to use libaio (0.3.106), and discovered it didn't have
eventfd support.  Or preadv/pwritev support.  And the testsuite didn't
compile.  Or work.

Anyway, it's shipped by the distros, so I figure it's worth patching.
I'm cc'ing Ben in the hope he's still maintaining it.  If not I'll
find a home somewhere for it.

(Thanks for Jeff's feedback on the first version of this patch).

Cheers,
Rusty.

diff -r 3a023dc4e63a ChangeLog
--- a/ChangeLog Tue Jan 08 14:38:53 2008 +1100
+++ b/ChangeLog Tue Jan 08 17:00:53 2008 +1100
@@ -1,3 +1,14 @@ 0.4.0
+rusty-v1
+   - Make tests compile again on modern systems (warnings + -Werror)
+   - Add 'make partcheck' and don't require manual setup for testing.
+   - Change test harness to compile against this dir, not global install
+   - Fix 5.t for archs where PROT_WRITE mappings are readable.
+   - Allow sending of SIGXFSZ on aio over limits
+   - Explicitly specify bash for runtests.sh
+   - Put deprecating comments on never-merged io_prep_poll
+   - Add io_prep_preadv and io_prep_pwritev
+   - Add eventfd support (io_set_eventfd).
+
 0.4.0
- remove libredhat-kernel
- add rough outline for man pages
diff -r 3a023dc4e63a Makefile
--- a/Makefile  Tue Jan 08 14:38:53 2008 +1100
+++ b/Makefile  Tue Jan 08 17:00:53 2008 +1100
@@ -17,6 +17,11 @@ install:
 install:
@$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) 
libdir=$(libdir)
 
+check:
+   @$(MAKE) -C harness check
+
+partcheck: all
+   @$(MAKE) -C harness partcheck
 
 clean:
@$(MAKE) -C src clean
diff -r 3a023dc4e63a harness/Makefile
--- a/harness/Makefile  Tue Jan 08 14:38:53 2008 +1100
+++ b/harness/Makefile  Tue Jan 08 17:00:53 2008 +1100
@@ -1,37 +1,56 @@
 # foo.
 TEST_SRCS:=$(shell find cases/ -name \*.t | sort -n -t/ -k2)
-PROGS:=$(patsubst %.t,%.p,$(TEST_SRCS))
+EXTRAPROGS:=cases/8.p cases/10.p
+PARTPROGS:=$(filter-out $(EXTRAPROGS), $(patsubst %.t,%.p,$(TEST_SRCS)))
+PROGS:=$(PARTPROGS) $(EXTRAPROGS)
 HARNESS_SRCS:=main.c
 # io_queue.c
 
-CFLAGS=-Wall -Werror -g -O -laio
+CFLAGS=-Wall -Werror -I../src -g -O
 #-lpthread -lrt
 
 all: $(PROGS)
 
 $(PROGS): %.p: %.t $(HARNESS_SRCS)
-   $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c
+   $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c ../src/libaio.a
 
 clean:
rm -f $(PROGS) *.o runtests.out rofile wofile rwfile
 
 .PHONY:
 
-testdir/rofile: .PHONY
+testdir/rofile: testdir .PHONY
rm -f $@
echo "test" >$@
chmod 400 $@
 
-testdir/wofile: .PHONY
+testdir/wofile: testdir .PHONY
rm -f $@
echo "test" >$@
chmod 200 $@
 
-testdir/rwfile: .PHONY
+testdir/rwfile: testdir .PHONY
rm -f $@
echo "test" >$@
chmod 600 $@
 
-check: $(PROGS) testdir/rofile testdir/rwfile testdir/wofile
-   ./runtests.sh $(PROGS)
+testdir testdir.enospc testdir.ext2:
+   mkdir $@
 
+root: .PHONY
+   @if [ `id -u` -ne 0 ]; then echo Need root for check, try partcheck 
>&2; exit 1; fi
+
+partcheck: $(PARTPROGS) testdir/rofile testdir/rwfile testdir/wofile
+   ./runtests.sh $(PARTPROGS)
+
+ext2.img:
+   dd if=/dev/zero bs=1M count=10 of=$@
+   mke2fs -F -b 4096 $@
+
+extracheck: $(EXTRAPROGS) root testdir.ext2 testdir.enospc ext2.img
+   mount -o loop -t ext2 ext2-enospc.img testdir.enospc
+   ./runtests.sh cases/10.p; ret=$$?; umount testdir.enospc; exit $$ret
+   mount -o loop -t ext2 ext2.img testdir.ext2
+   ./runtests.sh cases/8.p; ret=$$?; umount testdir.ext2; exit $$ret
+
+check: partcheck extracheck 
diff -r 3a023dc4e63a harness/cases/12.t
--- a/harness/cases/12.tTue Jan 08 14:38:53 2008 +1100
+++ b/harness/cases/12.tTue Jan 08 17:00:53 2008 +1100
@@ -20,11 +20,15 @@ int test_main(void)
 {
int res, status;
pid_t pid;
+   sigset_t set;
 
if (attempt_io_submit(io_ctx, 0, NULL, 0))
return 1;
 
-   sigblock(sigmask(SIGCHLD) | siggetmask());
+   sigemptyset(&set);
+   sigaddset(&set, SIGCHLD);
+   sigprocmask(SIG_BLOCK, &set, NULL);
+
fflush(NULL);
pid = fork();   assert(pid != -1);
 
diff -r 3a023dc4e63a harness/cases/14.t
--- a/harness/cases/14.tTue Jan 08 14:38:53 2008 +1100
+++ b/harness/cases/14.tTue Jan 08 17:00:53 2008 +1100
@@ -61,11 +61,14 @@ int test_main(void)
 {
int res, status;
pid_t pid;
+   sigset_t set;
 
if (attempt_io_submit(io_ctx, 0, NULL, 0))
return 1;
 
-   sigblock(sigmask(SIGCHLD) | siggetmask());
+   sigemptyset(&set);
+   sigaddset(&set, SIGCHLD);
+   sigprocmask(SIG_BLOCK, &set, NULL);
fflush(NULL);
pid = fork();   assert(pid != -1);
 
diff -r 3a023dc4e63a harness/cases/15.t
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/harness/cases/15.tTue Jan 08 17:00:53 2008 +1100
@@ -0,0 +1,94 @@
+/* 15.t
+- pwritev and

Re: [PATCH] Update to libaio?

2008-01-08 Thread Davide Libenzi
On Tue, 8 Jan 2008, Rusty Russell wrote:

> I recently tried to use libaio (0.3.106), and discovered it didn't have
> eventfd support.  Or preadv/pwritev support.  And the testsuite didn't
> compile.  Or work.
> 
> Anyway, it's shipped by the distros, so I figure it's worth patching.
> I'm cc'ing Ben in the hope he's still maintaining it.  If not I'll
> find a home somewhere for it.
> 
> (Thanks for Jeff's feedback on the first version of this patch).

I've had a few asking me how to use AIO with the new eventfd thing with 
libaio, but not knowing libaio status I told them to either contact libaio 
developers or use the direct KAIO syscall interface (what I used in my 
example code).
But all ppl that asked, were libaio users, so a library update would be 
welcome from them IMO.



- Davide



-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Zach Brown

> Come up 
> with some real design criteria that are to be satisfied so some real 
> direction can be had in discussions.

If you're so inclined, you can check out the ring that is being kicked
around in the syslets patches.  The main criteria there is that there
isn't a syscall to build up and initialize kernel state for the ring.
It means we have to play some games to serialize the two blocking stores
that make up event insertion, but there are some things we could do there.

- z

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Jeff Moyer
Rusty Russell <[EMAIL PROTECTED]> writes:

> I recently tried to use libaio (0.3.106), and discovered it didn't have
> eventfd support.  Or preadv/pwritev support.  And the testsuite didn't
> compile.  Or work.

> Anyway, it's shipped by the distros, so I figure it's worth patching.
> I'm cc'ing Ben in the hope he's still maintaining it.  If not I'll
> find a home somewhere for it.

Thanks for doing this, Rusty.  I have a few comments below.

> diff -ur libaio-0.3.106/ChangeLog libaio-0.3.106-aio_abi/ChangeLog
> --- libaio-0.3.106/ChangeLog  2002-10-01 08:09:56.0 +1000
> +++ libaio-0.3.106-aio_abi/ChangeLog  2008-01-03 17:48:48.0 +1100
> @@ -1,3 +1,14 @@
> +rusty-v1
> + - Make tests compile again on modern systems (warnings + -Werror)
> + - Add 'make partcheck' and don't require manual setup for testing.
> + - Change test harness to compile against this dir, not global install
> + - Fix 5.t for archs where PROT_WRITE mappings are readable.
> + - Allow sending of SIGXFSZ on aio over limits
> + - Explicitly specify bash for runtests.sh
> + - Remove (never-merged?) io_prep_poll

Well, I believe this was supported in Red Hat AS2.1 and RHEL 3.

> + - Add io_prep_preadv and io_prep_pwritev
> + - Add eventfd support (io_set_eventfd).
> +
>  0.4.0
>   - remove libredhat-kernel
>   - add rough outline for man pages
> diff -ur libaio-0.3.106/harness/cases/5.t 
> libaio-0.3.106-aio_abi/harness/cases/5.t
> --- libaio-0.3.106/harness/cases/5.t  2002-04-20 10:26:22.0 +1000
> +++ libaio-0.3.106-aio_abi/harness/cases/5.t  2008-01-03 16:29:37.0 
> +1100
> @@ -3,6 +3,7 @@
>  */
>  #include "aio_setup.h"
>  #include 
> +#include 
>  
>  int test_main(void)
>  {
> @@ -40,7 +41,13 @@
>   assert(buf != (char *)-1);
>  
>   status |= attempt_rw(rwfd, buf, SIZE,  0,  READ, SIZE);
> - status |= attempt_rw(rwfd, buf, SIZE,  0, WRITE, -EFAULT);
> +
> + /* Whether PROT_WRITE is readable is arch-dependent.  So compare
> +  * against pread result. */
> + res = write(rwfd, buf, SIZE);
> + if (res < 0)
> + res = -errno;
> + status |= attempt_rw(rwfd, buf, SIZE,  0, WRITE, res);

Am I missing something, or does the code change do the opposite of
what your comment suggests?

> diff -ur libaio-0.3.106/harness/cases/8.t 
> libaio-0.3.106-aio_abi/harness/cases/8.t
> --- libaio-0.3.106/harness/cases/8.t  2008-01-03 15:13:05.0 +1100
> +++ libaio-0.3.106-aio_abi/harness/cases/8.t  2008-01-03 18:47:23.0 
> +1100
> @@ -2,44 +2,23 @@
>  - Ditto for the above three tests at the offset maximum (largest
>possible ext2/3 file size.) (8.t)
>   */
> -#include 
> -
> -#define EXT2_OLD_SUPER_MAGIC 0xEF51
> -#define EXT2_SUPER_MAGIC 0xEF53
> +#include 
> +#include 
>  
>  long long get_fs_limit(int fd)
>  {
> - struct statfs s;
> - int res;
> - long long lim = 0;
> -
> - res = fstatfs(fd, &s);  assert(res == 0);
> + long long min = 0, max = 100ULL;
> + char c = 0;

How did you choose this upper bound?

Thanks,

Jeff

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Rusty Russell
On Tuesday 08 January 2008 08:25:07 Jeff Moyer wrote:
> Rusty Russell <[EMAIL PROTECTED]> writes:
> > I recently tried to use libaio (0.3.106), and discovered it didn't have
> > eventfd support.  Or preadv/pwritev support.  And the testsuite didn't
> > compile.  Or work.
> >
> > Anyway, it's shipped by the distros, so I figure it's worth patching.
> > I'm cc'ing Ben in the hope he's still maintaining it.  If not I'll
> > find a home somewhere for it.
>
> Thanks for doing this, Rusty.  I have a few comments below.

Thanks Jeff, I was wondering if I'd sent it into the void...

> > diff -ur libaio-0.3.106/ChangeLog libaio-0.3.106-aio_abi/ChangeLog
> > --- libaio-0.3.106/ChangeLog2002-10-01 08:09:56.0 +1000
> > +++ libaio-0.3.106-aio_abi/ChangeLog2008-01-03 17:48:48.0 
> > +1100
> > @@ -1,3 +1,14 @@
> > +rusty-v1
> > +   - Make tests compile again on modern systems (warnings + -Werror)
> > +   - Add 'make partcheck' and don't require manual setup for testing.
> > +   - Change test harness to compile against this dir, not global install
> > +   - Fix 5.t for archs where PROT_WRITE mappings are readable.
> > +   - Allow sending of SIGXFSZ on aio over limits
> > +   - Explicitly specify bash for runtests.sh
> > +   - Remove (never-merged?) io_prep_poll
>
> Well, I believe this was supported in Red Hat AS2.1 and RHEL 3.

Ah, OK.  It's not in mainline (only checked back to 2.6.12-rc2 tho).  I'll put 
them back with a comment to that effect...

> > assert(buf != (char *)-1);
> >
> > status |= attempt_rw(rwfd, buf, SIZE,  0,  READ, SIZE);
> > -   status |= attempt_rw(rwfd, buf, SIZE,  0, WRITE, -EFAULT);
> > +
> > +   /* Whether PROT_WRITE is readable is arch-dependent.  So compare
> > +* against pread result. */
> > +   res = write(rwfd, buf, SIZE);
> > +   if (res < 0)
> > +   res = -errno;
> > +   status |= attempt_rw(rwfd, buf, SIZE,  0, WRITE, res);
>
> Am I missing something, or does the code change do the opposite of
> what your comment suggests?

Err, yeah.  Works on x86 of course, but it's wrong.

> >  long long get_fs_limit(int fd)
> >  {
> > -   struct statfs s;
> > -   int res;
> > -   long long lim = 0;
> > -
> > -   res = fstatfs(fd, &s);  assert(res == 0);
> > +   long long min = 0, max = 100ULL;
> > +   char c = 0;
>
> How did you choose this upper bound?

Added a few zeroes to the previous one 8).  It's so fast I might as well 
choose 18446744073709551615LL.

Will update and re-send, this time cc'ing the linux-aio list.

Thanks,
Rusty.

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Rusty Russell
On Wednesday 09 January 2008 06:23:22 Zach Brown wrote:
> Sarah Sharp wrote:
> > I think the Debian package maintainer should also be involved in this.
> >
> > I would love to see preadv and pwritev go into libaio, as they will be
> > useful for userspace USB driver developers to interface with usbfs2
> > (http://wiki.cs.pdx.edu/usb/usbfs2.html).  I do have a few more issues
> > with the libaio-dev package.
>
> *I* would love for people to stop using libaio.

Then you will have to provide an alternative.

Since AIO now hooks up with eventfd, making it poll()able and not just a 
novelty, I'd say now is the time for such a thing.  Otherwise it'll be libaio 
everywhere.

> It's not a library, in 
> that it doesn't isolate applications from the system ABI.  It's no more
> than a bunch of inline functions.  It was a mistake, in my opinion, but
> here we are.

For some reason it implements the arch-specific syscalls manually, too.

Cheers,
Rusty.

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Zach Brown

> What's the driving need to rip out functionality?

Well, in this case of the ring it's an irritation to have to massage the
tracking of events into the ring format when you, say, back the aio
implementation with syslets.  If it were just queueing up results for
io_getevents(), which can lock in the kernel, we'd have more freedom.

It's a nit, don't get me wrong.

> Why not actually submit 
> some more in kernel implementations of aio and then evaluate if the api 
> really needs to be ripped out or not (and use syslets or whatever to 
> implement 
> them)?

Don't ask me, ask the subsystem maintainers who have not chosen to do
this over the last N years.

- z

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Rusty Russell
On Wednesday 09 January 2008 06:07:51 Jeff Moyer wrote:
> I've been keeping a copy on rhlinux.redhat.com.  You can access it
> via:
>
>   cvs -d :pserver:[EMAIL PROTECTED]:/usr/local/CVS login  # no
> password cvs -d :pserver:[EMAIL PROTECTED]:/usr/local/CVS co
> libaio

Excellent!  I'll feed you patches from now on then, should I find anything 
else.

> When I'm happy with the regression tests (they
> don't all pass for me on 2.6.24-rc7), I'll roll a new version and
> build it for Fedora.

Did you see my two kernel patches to fix them?  Attached for your 
convenience...

Rusty.
An AIO read or write should return -EINVAL if the offset is negative.
This check matches the one in pread and pwrite.

This was found by the libaio test suite.

Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
---
 fs/aio.c |4 
 1 file changed, 4 insertions(+)

diff -r 18802689361a fs/aio.c
--- a/fs/aio.c	Thu Jan 03 15:22:24 2008 +1100
+++ b/fs/aio.c	Thu Jan 03 18:05:25 2008 +1100
@@ -1330,6 +1330,10 @@ static ssize_t aio_rw_vect_retry(struct 
 		opcode = IOCB_CMD_PWRITEV;
 	}
 
+	/* This matches the pread()/pwrite() logic */
+	if (iocb->ki_pos < 0)
+		return -EINVAL;
+
 	do {
 		ret = rw_op(iocb, &iocb->ki_iovec[iocb->ki_cur_seg],
 			iocb->ki_nr_segs - iocb->ki_cur_seg,
When an AIO write gets a non-retry error after writing some data
(eg. ENOSPC), it should return the amount written already, not the
error.  Just like write() is supposed to.

This was found by the libaio test suite.

Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
Acked-By: Zach Brown <[EMAIL PROTECTED]>
---
 fs/aio.c |7 +++
 1 file changed, 7 insertions(+)

diff -r 18802689361a fs/aio.c
--- a/fs/aio.c	Thu Jan 03 15:22:24 2008 +1100
+++ b/fs/aio.c	Thu Jan 03 18:05:25 2008 +1100
@@ -1346,6 +1350,13 @@ static ssize_t aio_rw_vect_retry(struct 
 	/* This means we must have transferred all that we could */
 	/* No need to retry anymore */
 	if ((ret == 0) || (iocb->ki_left == 0))
+		ret = iocb->ki_nbytes - iocb->ki_left;
+
+	/* If we managed to write some out we return that, rather than
+	 * the eventual error. */
+	if (opcode == IOCB_CMD_PWRITEV
+	&& ret < 0 && ret != -EIOCBQUEUED && ret != -EIOCBRETRY
+	&& iocb->ki_nbytes - iocb->ki_left)
 		ret = iocb->ki_nbytes - iocb->ki_left;
 
 	return ret;
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Zach Brown

> Then you will have to provide an alternative.

If it were up to me, we'd freeze AIO at it's current level of support
and migrate people towards syslets, possibly via posix aio in glibc
depending on their needs.  Yes, this won't happen immediately ;).

> Since AIO now hooks up with eventfd, making it poll()able and not just a 
> novelty, I'd say now is the time for such a thing.  Otherwise it'll be libaio 
> everywhere.

Well, if Jeff is maintaining libaio, I don't see that we have a pressing
problem.

- z

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: [PATCH] Update to libaio?

2008-01-08 Thread Jeff Moyer
Rusty Russell <[EMAIL PROTECTED]> writes:

> I recently tried to use libaio (0.3.106), and discovered it didn't have
> eventfd support.  Or preadv/pwritev support.  And the testsuite didn't
> compile.  Or work.
>
> Anyway, it's shipped by the distros, so I figure it's worth patching.
> I'm cc'ing Ben in the hope he's still maintaining it.  If not I'll
> find a home somewhere for it.

I've been keeping a copy on rhlinux.redhat.com.  You can access it
via:

  cvs -d :pserver:[EMAIL PROTECTED]:/usr/local/CVS login  # no password
  cvs -d :pserver:[EMAIL PROTECTED]:/usr/local/CVS co libaio

> (Thanks for Jeff's feedback on the first version of this patch).

I think we also need to update the test cases to use O_DIRECT, since
buffered AIO isn't really supported.  I'll work on that.  In the mean
time, I've incorporated your changes into a work branch
(jmoyer-work-branch).  When I'm happy with the regression tests (they
don't all pass for me on 2.6.24-rc7), I'll roll a new version and
build it for Fedora.

Thanks again!

Jeff

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


VMWare and Wireless bridge

2008-01-08 Thread Jonathan Jesse
If I receall correctly there was some discussion on this list (or
another Uubntu list) in regards to using VMWare and communication over
wireless?  I have my VM machines setup with NAT communication.  They
can communicate fine to the internet but not to each other machines.

Did this converstation happen here or elsewhere?  Any thoughts on what
I have to do get this working?

Thanks, or please direct me to the right mailing list.

Jonathan

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: A Look at the Ubuntu Installer

2008-01-08 Thread Evan Dandrea

On Tue, 2008-01-08 at 17:51 +0100, Thorsten Wilms wrote:
> > Let's hope it won't be forgotten in the depth of the ML, like many
> > other great things... Have you directly contacted the authors?
> 
> An email to Colin Watson (installer team leader), no answer.
> Hmm, yes, maybe I should contact the debian installer authors.

I would kindly advise against that.  While debian-installer forms the
base code for ubiquity, the Ubuntu desktop CD installer, the interface
code is an entirely separate body of work maintained by the Ubuntu
Installer Team.  So being something that they don't themselves use, the
Debian developers would probably have little interest in this subject.

I imagine the reason you have not gotten a response from Colin yet is
that he has been on holiday, and most certainly has a large backlog of
email.

But please be patient, I am finishing up a reply to your original email
now.

Thanks,
Evan


signature.asc
Description: This is a digitally signed message part
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: ghc6 (Haskell compiler) becoming old

2008-01-08 Thread Stefan Potyra
Hi,

Am Montag 07 Januar 2008 16:39:29 schrieb Michael Bienia:
> On 2008-01-06 02:15:18 -0500, Paul Dufresne wrote:
> > One of my new year resolution is to become a not too bad Haskell
> > programmer in 2008.
> > That said, I would like to have latest development version of ghc6
> > (Glasgow Haskell Compiler) which is the most well known Haskell
> > compiler in Haskell community, inside Hardy.
> >
> > Unfortunately, Debian Sid just have the 6.6.1 version (that was
> > released april 26, 2007) and the current version on ghc web site is
> > 6.8.2. (released december 12, 2007).
>
> Debian unstable has ghc 6.8.2 now (see
> http://packages.qa.debian.org/g/ghc6/news/20080106T214705Z.html).

Excellent!

>
> > *Maybe* the reason is that many sub libraries need to be rebuilt with
> > a new compiler,
> > and *maybe* this is a lot of job, I don't know.
>
> I've also seen some uploads of other haskell packages but didn't pay to
> much attention at the changelog.
> The haskell packages have a very strict dependency on the ghc6 package
> so they need at least be rebuild with the newer ghc6.
>
> If you are interested to see a newer ghc6 in hardy, a list of packages
> which need to be synced from Debian unstable would be helpful.

At first we'll need hscolour (sync just requested), because ghc6 needs it to 
build (afaict only the documentation needs this, otherwise, we'd be in severe 
bootstrapping trouble :/).

Next step is to merge ghc6 (I'm just trying a local build...).

Finally pretty much every haskell lib needs a rebuild, which it does in debian 
as well, so we can hopefully sync as much as possible. I used to have a list 
some time ago (with dependencies, because some libs need to be rebuilt in 
order), but I seem to have deleted it.

I guess 
apt-cache rdepends ghc6 
should give at least a rough list of packages to look at.

Cheers,
Stefan.


signature.asc
Description: This is a digitally signed message part.
-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Questions about devel-discuss

2008-01-08 Thread Matthew Paul Thomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan Musther wrote:
>...
> To a certain extent of course I'm interested in pushing the spec
> https://blueprints.launchpad.net/ubuntu/+spec/prompt-for-fsck-on-shutdown
> which I am behind.  It has vast user support, and has support on here, but I
> don't know where to go now - and I feel that the other great ideas being
> discussed are probably in the same position (at least some of them).
>...

The blueprint is currently in "Pending Approval" state. Since we are
outside the usual period for approving blueprints, you may want to
contact the approver directly and ask them to look at it.

Cheers
- --
Matthew Paul Thomas
http://mpt.net.nz/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHg7816PUxNfU6ecoRAtBOAKCk8M6icCnIfNfW+OdcgCbvsYg9IQCdE0Yf
bzNAV+nsMayWIDiX5TJMbRs=
=zTip
-END PGP SIGNATURE-

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: Team TODO pages

2008-01-08 Thread Matthew Paul Thomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daniel Holbach wrote:
> 
> On Mi, 2008-01-02 at 12:02 +, Matthew Paul Thomas wrote:
>...
>> What would you need in Launchpad to make this wiki listing unnecessary? 
>> Mass tagging  would let you add a 
>> "thisweek" or similar tag to multiple bugs at once. What else would you 
>> need? 
> 
> Searching for multiple tags ("thisweek" + "bitesize" for example).

You'll be pleased to know this has just been implemented, and should
appear on launchpad.net in a few weeks. 

>> For example, how do you currently tell which Ubuntu bugs are 
>> Desktop Team bugs and which aren't? 
> 
> I pass a custom Launchpad bug list URL to 'hugdaylist' (in the
> ubuntu-dev-tools) package.

- From reading hugdaylist, it filters the bug list in two ways:

*   It excludes "Fix Released" bugs. Launchpad's advanced search can do
this already: select all the statuses except for "Fix Released".

*   It excludes bugs that have either ubuntu-main-sponsors or
ubuntu-universe-sponsors as a subscriber. I've reported a bug for
making this possible in Launchpad.


>...
> The intention behind this was that small bug list presented during
> events like Hug Days show a manageable amount of work that can be done
> by the group.
> (eg: https://wiki.ubuntu.com/UbuntuBugDay/20070912?action=raw)

Launchpad could do this using a custom batch size -- except that as soon
as a bug was marked Fix Released it would disappear from the list, only
to be replaced by the next. :-)

> Also teams like the Desktop Team make use of the Wiki to manage their
> weekly workload: https://wiki.ubuntu.com/DesktopTeam/WeeklyTODO
>...

I wonder if it would make sense to track those package updates as bug
reports too, so that the people doing them could see them in the same
list as any other bugs assigned to them.

Cheers
- --
Matthew Paul Thomas
http://mpt.net.nz/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHg7TR6PUxNfU6ecoRAuLeAJ94xJ42DuXLQajig8m7lU0vaLZIDwCfVXXg
zLO/SUGQTwlzT5yMA2cRX0o=
=xfd/
-END PGP SIGNATURE-

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: A Look at the Ubuntu Installer

2008-01-08 Thread Thorsten Wilms
On Tue, 2008-01-08 at 13:13 +0100, Nicolas Deschildre wrote:
> Very nice review, a lot of attention to detail.

Thanks!

> Let's hope it won't be forgotten in the depth of the ML, like many
> other great things... Have you directly contacted the authors?

An email to Colin Watson (installer team leader), no answer.
Hmm, yes, maybe I should contact the debian installer authors.

-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: A Look at the Ubuntu Installer

2008-01-08 Thread Thorsten Wilms
On Mon, 2008-01-07 at 16:45 -0500, Vadim Peretokin wrote:
> That's a very nice pdf. One minor thing:

Thanks!

Also thanks for all the other supportive comments :)


> User Switching
> The User Switcher applet shouldn't appear with only one user.
> 
> I think it should, to let the use familiarize themselves. It'll be a
> bit disorienting (like where did that come from?) if the applet
> suddenly appeared after the installation.

There's no real getting to know the user switcher with only one account.
I think it should only ever appear if and as soon as there is more than
one account. In all other cases it's just noise.

Not central at all, though ;)

-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/


-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: New Programs for Hardy?

2008-01-08 Thread Greg K Nicholson

> What about the menu button though?  Who ever uses that?  It does the
> same thing as right-clicking all the time, so it's kinda pointless.
> 
People using a keyboard and not a mouse use the menu key.

I have the right Windows key set as Compose as it doesn't seem to do
anything else. (Amarok's global shortcuts make use of the left Windows
key.)



-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Bdd EvolutionLocal in OpenOffice limited

2008-01-08 Thread Jovial
Hello

I'm tryng to use data from evolution.contact with openoffice 2.2/2.3 in 
ubuntu 7.04/7.10
openoffice.org-evolution give the source EvolutionLocal in OOo with 
/home/user/.openoffice.org2/user/database/evolocal.odb

In base or base explorer(F4) I can acces to data from my adress book 
"personal"
But I meet some limitations:
• It is impossible to sort data by columns, the buton sort ascending of 
toolbar data base is inactive.(gray)
• It is impossible to apply a filter
• The result of querry SQL = SELECT "file_as" FROM "Personal" AS 
"Personal" ORDER BY "file_as" ASC is not ordered
• SELECT "file_as" FROM "Personal" AS "Personal" WHERE ( ( "org" IS NOT 
NULL ) ) give no result
All these limitations prevents to use all the possibilitties given by 
OOo . It a pity because a sorted addresbook fully operationnal in OOo 
will be beneficial to Ubuntu.

• Do you consider this as a limitation or a bug ?
• Did you know any solution ?
• Can we expect evolutions in the futur ?

Bye

Jean-Luc

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss


Re: A Look at the Ubuntu Installer

2008-01-08 Thread Nicolas Deschildre
Very nice review, a lot of attention to detail.

Let's hope it won't be forgotten in the depth of the ML, like many
other great things... Have you directly contacted the authors?

Nicolas

On Jan 7, 2008 8:16 PM, Thorsten Wilms <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I did a walk-through and compiled issues, suggestions and several
> mockups regarding the Ubuntu installation:
>
> http://thorwil.files.wordpress.com/2008/01/ubuntu_installer_thorwil.pdf
>
> Any comments welcome. I'm willing to refine things where and if there's
> interest. I could file requests if that's deemed helpful.
>
> The document is actually a bit older, but I decided to wait past the
> holidays ;)
>
> --
> Thorsten Wilms
>
> thorwil's design for free software:
> http://thorwil.wordpress.com/
>
>
> --
> Ubuntu-devel-discuss mailing list
> Ubuntu-devel-discuss@lists.ubuntu.com
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
>

-- 
Ubuntu-devel-discuss mailing list
Ubuntu-devel-discuss@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss