lkml.org 
[lkml]   [2010]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH][resend][SCSI] Reduce number of sequential pointer derefs in scsi_error.c and reduce size as well
    From
    Date
    On Sun, 2010-11-21 at 19:48 +0100, Jesper Juhl wrote:
    > On Sat, 20 Nov 2010, Linus Torvalds wrote:
    >
    > > On Sat, Nov 20, 2010 at 12:30 PM, Jesper Juhl <jj@chaosbits.net> wrote:
    > > >
    > > > Ok, I tried doing that (see patch below)
    > >
    > > Actually, you kind of chose exactly the reverse of the functions I'd
    > > have chosen.
    > >
    > > Try doing the added parameter to the small static helper functions.
    > > Those are the ones that tend to get inlined, and then the parameter
    > > should actually result in _fewer_ pointer reloads.
    > >
    > > So the ones like this:
    > >
    > > > static int __scsi_try_to_abort_cmd(struct scsi_cmnd *scmd)
    > [...]
    >
    > I see your point now.
    >
    > I tried this with most of the functions where it seemed that it could
    > possibly be a gain, but in the end it turned out that only the one you
    > pointed out above actually saw any benefit, so that's the only one I
    > changed.
    >
    > In the end, the object size is down to this:
    >
    > text data bss dec hex filename
    > 18713 128 4704 23545 5bf9 drivers/scsi/scsi_error.o
    >
    > from this:
    >
    > text data bss dec hex filename
    > 18790 128 4712 23630 5c4e drivers/scsi/scsi_error.o
    >
    >
    > and the patch looks like this now:
    >
    > Signed-off-by: Jesper Juhl <jj@chaosbits.net>

    This is rejecting against scsi-misc:

    patching file drivers/scsi/scsi_error.c
    Hunk #9 FAILED at 610.
    Hunk #10 FAILED at 647.
    Hunk #11 succeeded at 850 (offset -22 lines).
    Hunk #12 succeeded at 970 (offset -22 lines).
    Hunk #13 succeeded at 1013 (offset -22 lines).
    Hunk #14 succeeded at 1067 (offset -22 lines).
    Hunk #15 succeeded at 1167 (offset -33 lines).
    Hunk #16 succeeded at 1184 (offset -33 lines).
    Hunk #17 succeeded at 1226 (offset -33 lines).
    Hunk #18 succeeded at 1379 (offset -33 lines).
    Hunk #19 succeeded at 1976 (offset -33 lines).
    2 out of 19 hunks FAILED -- saving rejects to file
    drivers/scsi/scsi_error.c.rej

    It looks like changes caused by

    commit 459dbf72e4d2b4aa13620e6b70d54f098547bf13
    [SCSI] Eliminate error handler overload of the SCSI serial number

    Could you respin so it applies, please?

    Thanks,

    James




    \
     
     \ /
      Last update: 2010-12-21 18:41    [W:0.025 / U:61.620 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site