Re: [PATCH 05/19] sg: replace rq array with lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-05-25 5:33 a.m., kbuild test robot wrote:
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20190524]
[cannot apply to v5.2-rc1]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-v4-interface-rq-sharing-multiple-rqs/20190525-161346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
         chmod +x ~/bin/make.cross
         # save the attached .config to linux build tree
         GCC_VERSION=7.4.0 make.cross ARCH=powerpc

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

    drivers/scsi/sg.c: In function 'sg_ioctl':
drivers/scsi/sg.c:1698:1: warning: the frame size of 5824 bytes is larger than 2048 bytes [-Wframe-larger-than=]
     }
     ^

Hi Robot,
That seems a surprisingly large stack size for that architecture. When
I do:
  make checkstack drivers/scsi/sg.o

there are over 200 other "stack hogs" larger than sg_ioctl() which clocks
in at 536 bytes ***. The is on x86_64 (i5-7200U) architecture. Even the
winners on my list are comfortably under 2048 bytes:

0xffffffff81052c11 sha1_transform_avx2 [vmlinux]:       1376
0xffffffff81054a83 _end [vmlinux]:                      1376
0x00000dd1 test_queue [usbtest]:                        1224
0x00001321 test_queue [usbtest]:                        1224
0x0000aa79 ipmi_panic_request_and_wait [ipmi_msghandler]:1088
0xffffffff8121378f do_sys_poll [vmlinux]:               992
0xffffffff81213ca8 do_sys_poll [vmlinux]:               992
....

I could trim some more bytes (e.g. the SG_LOG() macro does a stack allocation
of 160 bytes, probably 100 would be enough) but that won't bring the
reported 5824 byte stack usage anywhere near the safe range.

Doug Gilbert

*** and sg_ioctl() is the biggest sg driver stack hog on my list, followed
    by sg_read at 368 bytes.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux