Re: [PATCH 2/2] scsi: core: avoid to pre-allocate big chunk for sg list

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

 



On Tue, Apr 23, 2019 at 08:37:15AM -0700, Bart Van Assche wrote:
> On Tue, 2019-04-23 at 18:32 +0800, Ming Lei wrote:
> >  #define  SCSI_INLINE_PROT_SG_CNT  1
> >  
> > +#define  SCSI_INLINE_SG_CNT  2
> 
> So this patch inserts one kmalloc() and one kfree() call in the hot path
> for every SCSI request with more than two elements in its scatterlist? Isn't

Slab or its variants are designed for fast path, and NVMe PCI uses slab
for allocating sg list in fast path too.

> "2" too low? Or in other words, what is the performance impact of this patch
> for a real-world workload?

2 is used by NVMe PCI for a while, and even recently it is reduced to 1.

I have run big BS(256k) fio test on scsi_debug(can_queue: 256, submit queues: 12 LUNs: 4,
delay: 0, io sched: none), not see obvious performance difference by this patch.

Thanks, 
Ming



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux