lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86a768ba44d3d2009c313bd2b7ddf25e2a3f4b5e.camel@trillion01.com>
Date:   Sun, 20 Jun 2021 17:05:48 -0400
From:   Olivier Langlois <olivier@...llion01.com>
To:     Pavel Begunkov <asml.silence@...il.com>,
        Jens Axboe <axboe@...nel.dk>, io-uring@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] io_uring: reduce latency by reissueing the operation

On Sun, 2021-06-20 at 20:56 +0100, Pavel Begunkov wrote:
> On 6/20/21 8:05 PM, Olivier Langlois wrote:
> > 
> >  
> > -static bool io_arm_poll_handler(struct io_kiocb *req)
> > +#define IO_ARM_POLL_OK    0
> > +#define IO_ARM_POLL_ERR   1
> > +#define IO_ARM_POLL_READY 2
> 
> Please add a new line here. Can even be moved somewhere
> to the top, but it's a matter of taste.

If you let me decide, I prefer to let them close to where they are
used. There is so much data definitions in the heading section that I
feel like putting very minor implementation details to it might
overwhelm newcomers instead of helping them to grasp the big picture.

but I will add an extra space as you request
> 
> Also, how about to rename it to apoll? io_uring internal
> rw/send/recv polling is often abbreviated as such around
> io_uring.c
> IO_APOLL_OK and so on.

no problem. I will.
> 
> > +static int io_arm_poll_handler(struct io_kiocb *req)
> >  {
> >         const struct io_op_def *def = &io_op_defs[req->opcode];
> >         struct io_ring_ctx *ctx = req->ctx;
> > @@ -5153,22 +5156,22 @@ static bool io_arm_poll_handler(struct
> > io_kiocb *req)
> >         int rw;
> >  
> >         if (!req->file || !file_can_poll(req->file))
> > -               return false;
> > +               return IO_ARM_POLL_ERR;
> 
> It's not really an error. Maybe IO_APOLL_ABORTED or so?

Ok.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ