[PATCH 01/14] nvmet: for pt I/O cmds annotate req->sg_cnt likely
hch at lst.de
hch at lst.de
Fri Aug 14 06:33:56 EDT 2020
On Mon, Aug 10, 2020 at 04:55:54PM -0600, Logan Gunthorpe wrote:
>
>
> On 2020-08-10 4:54 p.m., Chaitanya Kulkarni wrote:
> > On 8/10/20 14:54, Logan Gunthorpe wrote:
> >> Hey,
> >>
> >> You forgot to CC me again....
> >>
> > Ugghhh..
> >> On 2020-08-10 12:54 p.m., Chaitanya Kulkarni wrote:
> >>> I/O Commands (nvme_cmd_read, nvme_cmd_write) are most command commands
> >>> when accessing passthru controller. For I/O commands data is represented
> >>> in SG list, so sg_cnt != 0 in most cases.
> >>>
> >>> Annotate req->sg_cnt check with likely.
> >> Does adding these likely annotations actually produce any benefit? Why
> >> can't we rely on the branch predictor in these instances?
> >>
> >
> > They are present in the target code. I don't see any problem having it
> > in a passthru code unless it shows severe performance degradation.
>
> Isn't that backwards? Don't we only add performance optimizations (which
> likely/unlikely are) when they show demonstrable increases in performance?
Yes, this looks like pretty premature optimization.
More information about the Linux-nvme
mailing list