Re: read failed EINVAL with O_DIRECT flag

2005-04-13 Thread Yves Crespin
>| How can I obtains an buffer alignement from a "user program" ? > >I actually left that as an exercise (after I did it at home >last night). Did you read the hint (below)? Well ... either with malloc() and alignement or posix_memalign(), read() still failed! My read buffer is in user space, so

Re: read failed EINVAL with O_DIRECT flag

2005-04-13 Thread Yves Crespin
| How can I obtains an buffer alignement from a user program ? I actually left that as an exercise (after I did it at home last night). Did you read the hint (below)? Well ... either with malloc() and alignement or posix_memalign(), read() still failed! My read buffer is in user space, so it's

Re: read failed EINVAL with O_DIRECT flag

2005-04-12 Thread Yves Crespin
I've got compilation error when I call vmalloc() from a user program (w/o defined __KENEL). How can I obtains an buffer alignement from a "user program" ? Randy.Dunlap wrote: On Mon, 11 Apr 2005 21:14:17 +0200 Yves Crespin wrote: | Hello, | | Using O_DIRECT flag, read() failed

Re: read failed EINVAL with O_DIRECT flag

2005-04-12 Thread Yves Crespin
I've got compilation error when I call vmalloc() from a user program (w/o defined __KENEL). How can I obtains an buffer alignement from a user program ? Randy.Dunlap wrote: On Mon, 11 Apr 2005 21:14:17 +0200 Yves Crespin wrote: | Hello, | | Using O_DIRECT flag, read() failed and errno is EINVAL

read failed EINVAL with O_DIRECT flag

2005-04-11 Thread Yves Crespin
Hello, Using O_DIRECT flag, read() failed and errno is EINVAL. kernel 2.4.22 Filesystem Ext3 mount on /home What's wrong ? Thanks Yves Crespin #gcc -Wall -D_GNU_SOURCE direct.c -o direct #cp direct d #./direct d #open failed [d] 040402 0666 errno 22 # /* --- start code --- */ #include #include

read failed EINVAL with O_DIRECT flag

2005-04-11 Thread Yves Crespin
Hello, Using O_DIRECT flag, read() failed and errno is EINVAL. kernel 2.4.22 Filesystem Ext3 mount on /home What's wrong ? Thanks Yves Crespin #gcc -Wall -D_GNU_SOURCE direct.c -o direct #cp direct d #./direct d #open failed [d] 040402 0666 errno 22 # /* --- start code --- */ #include stdio.h

Re: Disable cache disk

2005-03-30 Thread Yves Crespin
Christian Bornträger wrote: On Wednesday 30 March 2005 15:00, Yves Crespin wrote: 1/ is-it possible to *really* be synchronize. I prefer to have a blocked write() than use cache and get swap! Try to mount with the sync option. exactly async and noatime ? 2/ is-it possible to disable

Disable cache disk

2005-03-30 Thread Yves Crespin
Hello, I write a lot of files on a USB disk for video monitoring archiving. The write program is faster than the USB. Cache disk take all RAM and kernel start swapping and everything become very slow. 1/ is-it possible to *really* be synchronize. I prefer to have a blocked write() than use cache

Disable cache disk

2005-03-30 Thread Yves Crespin
Hello, I write a lot of files on a USB disk for video monitoring archiving. The write program is faster than the USB. Cache disk take all RAM and kernel start swapping and everything become very slow. 1/ is-it possible to *really* be synchronize. I prefer to have a blocked write() than use cache

Re: Disable cache disk

2005-03-30 Thread Yves Crespin
Christian Bornträger wrote: On Wednesday 30 March 2005 15:00, Yves Crespin wrote: 1/ is-it possible to *really* be synchronize. I prefer to have a blocked write() than use cache and get swap! Try to mount with the sync option. exactly async and noatime ? 2/ is-it possible to disable

sigwait() and 2.6

2005-02-15 Thread Yves Crespin
Hi, Going on a 2.6 kernel, I have a trouble with sigwait() When I send a kill to this program, the exit code is 143 (signal 15 and core)! Is there a workaround ? Thanks, Yves gcc -g -Wall -D_REENTRANT=1 -D_THREAD_SAFE=1 s.c -lpthread -o s /= début du code =/ #include #include #include

sigwait() and 2.6

2005-02-15 Thread Yves Crespin
Hi, Going on a 2.6 kernel, I have a trouble with sigwait() When I send a kill to this program, the exit code is 143 (signal 15 and core)! Is there a workaround ? Thanks, Yves gcc -g -Wall -D_REENTRANT=1 -D_THREAD_SAFE=1 s.c -lpthread -o s /= début du code =/ #include unistd.h #include