From mboxrd@z Thu Jan 1 00:00:00 1970 From: Milosz Tanski Subject: Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only) Date: Thu, 26 Mar 2015 22:26:45 -0400 Message-ID: References: <20150326115514.GA12329@infradead.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3fd941c8a4905123bdd77 Cc: LKML , "linux-fsdevel@vger.kernel.org" , "linux-aio@kvack.org" , Mel Gorman , Volker Lendecke , Tejun Heo , Jeff Moyer , "Theodore Ts'o" , Al Viro , Linux API , Michael Kerrisk , linux-arch@vger.kernel.org, Dave Chinner , Andrew Morton To: Christoph Hellwig Return-path: In-Reply-To: Sender: owner-linux-aio@kvack.org List-Id: linux-fsdevel.vger.kernel.org --001a11c3fd941c8a4905123bdd77 Content-Type: text/plain; charset=UTF-8 On Thu, Mar 26, 2015 at 3:12 PM, Milosz Tanski wrote: > On Thu, Mar 26, 2015 at 7:55 AM, Christoph Hellwig > wrote: > > > > On Mon, Mar 16, 2015 at 02:27:10PM -0400, Milosz Tanski wrote: > > > This patchset introduces two new syscalls preadv2 and pwritev2. They > are the > > > same syscalls as preadv and pwrite but with a flag argument. > Additionally, > > > preadv2 implements an extra RWF_NONBLOCK flag. > > > > There was some arugment that we just don't wait and don't have the > > classic unix "blocking" semantics. Maybe it's time to bite the bullet > > and rename it to RWF_DONTWAIT? (I personally dont really care). > > > Sure. It is in line with the MSG_DONTWAIT flag for sendmsg() which > this whole idea is based on anyways. > Okay, It's RWF_DONTWAIT now. I also split it into two RWF_DONTWAIT for the userspace API and IOCB_DONTWAIT that goes into kiocb->ki_flags. > > > > > > > Second this probably needs to be on top of Al's for-next tree: > > > > > https://git.kernel.org/cgit/linux/kernel/git/viro/vfs.git/log/?h=for-next > > > > Note that this has a flags field in struct kiocb, so we could just use > > that for the flags. > > > Okay I started rebasing the patches on-top of that. I did see that > there is a new flags field "ki_flags". I see that there's already a > IOCB_EVENTFD flag. > > Did you see you Andres' question about making the flags a enum? I > usually wouldn't do that, because C++ is stronger when it comes enums, > you can't combine them then assignment them to an enum without a cast. > But in the kernel this doesn't matter. > > > > > > > Otherwise this version look fine to me, let's get it merged! > > > > Al, are yo ready to pick this up? I'd hate to miss another merge > > window. > > > Just got back from vacation today, I'll try to get this out before the > end of the week. I also have to make some adjustments to xfs-tests (to > push preadv2 into xfs_io). > You'll see the patches and the pull request against viro/for-next branch tomorrow. The rebase was a bit of work since you guys changed a fair amount of stuff. > > > -- > Milosz Tanski > CTO > 16 East 34th Street, 15th floor > New York, NY 10016 > > p: 646-253-9055 > e: milosz@adfin.com > -- Milosz Tanski CTO 16 East 34th Street, 15th floor New York, NY 10016 p: 646-253-9055 e: milosz@adfin.com --001a11c3fd941c8a4905123bdd77 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Thu, Mar 26, 2015 at 3:12 PM, Milosz Tanski <milosz@adfin.com>= ; wrote:
On Thu, Mar 26, 2015 a= t 7:55 AM, Christoph Hellwig <hch@i= nfradead.org> wrote:
>
> On Mon, Mar 16, 2015 at 02:27:10PM -0400, Milosz Tanski wrote:
> > This patchset introduces two new syscalls preadv2 and pwritev2. T= hey are the
> > same syscalls as preadv and pwrite but with a flag argument. Addi= tionally,
> > preadv2 implements an extra RWF_NONBLOCK flag.
>
> There was some arugment that we just don't wait and don't have= the
> classic unix "blocking" semantics.=C2=A0 Maybe it's time= to bite the bullet
> and rename it to RWF_DONTWAIT? (I personally dont really care).


Sure. It is in line with the MSG_DONTWAIT flag for sendmsg() which this whole idea is based on anyways.

Ok= ay, It's RWF_DONTWAIT now. I also split it into two RWF_DONTWAIT for th= e userspace API and IOCB_DONTWAIT that goes into kiocb->ki_flags.
<= div>=C2=A0

>
>
> Second this probably needs to be on top of Al's for-next tree:
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0https:= //git.kernel.org/cgit/linux/kernel/git/viro/vfs.git/log/?h=3Dfor-next >
> Note that this has a flags field in struct kiocb, so we could just use=
> that for the flags.


Okay I started rebasing the patches on-top of that. I did see that there is a new flags field "ki_flags". I see that there's alr= eady a
IOCB_EVENTFD flag.

Did you see you Andres' question about making the flags a enum? I
usually wouldn't do that, because C++ is stronger when it comes enums,<= br> you can't combine them then assignment them to an enum without a cast.<= br> But in the kernel this doesn't matter.

>
>
> Otherwise this version look fine to me, let's get it merged!
>
> Al, are yo ready to pick this up?=C2=A0 I'd hate to miss another m= erge
> window.


Just got back from vacation today, I'll try to get this out befo= re the
end of the week. I also have to make some adjustments to xfs-tests (to
push preadv2 into xfs_io).

You'll s= ee the patches and the pull request against =C2=A0viro/for-next branch=C2= =A0tomorrow. The rebase was a bit of work since you guys changed a fair amo= unt of stuff.
=C2=A0


--
Milosz Tanski
CTO
16 East 34th Street, 15th floor
New York, NY 10016

p: 646-253-9055
e: milosz@adfin.com



--
Milosz Tanski
CTO
1= 6 East 34th Street, 15th floor
New York, NY 10016

p: 646-253-9055=
e: milosz@adfin.c= om
--001a11c3fd941c8a4905123bdd77-- -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to majordomo@kvack.org. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: aart@kvack.org