Re: [PATCH 3/9] scsi: use external buffer for command logging

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

 



On Wed, 2015-01-14 at 10:36 +0100, hch@xxxxxx wrote:
> On Tue, Jan 13, 2015 at 06:56:17PM +0000, James Bottomley wrote:
> > I really hate using an on-stack buffer here ... we're pretty deep in the
> > call chain already.
> > 
> > Since it's just required for printing a "command: " prefix, why not just
> > use scsi_print_command()?
> 
> Both the ch and sr callers are not really a problem in terms of stack
> usage, as they are directly in file operations of character or block
> devices, so the whole FS/MM stack stack problem isn't an issue.

Trying to calculate minutely how much additional overhead there is isn't
really the point.  The point is we can just use a different function
that doesn't consume the on stack buffer, so we should, just as a matter
of best practise.  I agree it would have been a more finely balanced
problem if we definitely needed the allocation

> But using higher level functions might still be useful here.

James

��.n��������+%������w��{.n�����{������ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[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