Re: [Question] IO is split by block layer when size is larger than 4k

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

 



On Tue, Mar 17, 2020 at 04:19:44PM +0800, Feng Li wrote:
> Thanks.
> Sometimes when I observe multipage bvec on 5.3.7-301.fc31.x86_64.
> This log is from Qemu virtio-blk.
> 
> ========= size: 262144, iovcnt: 2
>       0: size: 229376 addr: 0x7fff6a7c8000
>       1: size: 32768 addr: 0x7fff64c00000
> ========= size: 262144, iovcnt: 2
>       0: size: 229376 addr: 0x7fff6a7c8000
>       1: size: 32768 addr: 0x7fff64c00000

Then it is working.

> 
> I also tested on 5.6.0-0.rc6.git0.1.vanilla.knurd.1.fc31.x86_64.
> And observe 64 iovcnt.
> ========= size: 262144, iovcnt: 64
>       0: size: 4096 addr: 0x7fffb5ece000
>       1: size: 4096 addr: 0x7fffb5ecd000
> ...
>       63: size: 4096 addr: 0x7fff8baec000
> 
> So I think this is a common issue of the upstream kernel, from 5.3 to 5.6.

As I mentioned before, it is because the pages aren't contiguous
physically.

If you enable hugepage, you will see lot of pages in one single bvec.

> 
> BTW, I have used your script on 5.3.7-301.fc31.x86_64, it works well.
> However, when updating to kernel 5.6.0-0.rc6.git0.1.vanilla.knurd.1.fc31.x86_64.
> It complains:
> 
> root@192.168.19.239 16:57:23 ~ $ ./bvec_avg_pages.py
> In file included from /virtual/main.c:2:
> In file included from
> /lib/modules/5.6.0-0.rc6.git0.1.vanilla.knurd.1.fc31.x86_64/build/include/uapi/linux/ptrace.h:142:
> In file included from
> /lib/modules/5.6.0-0.rc6.git0.1.vanilla.knurd.1.fc31.x86_64/build/arch/x86/include/asm/ptrace.h:5:
> /lib/modules/5.6.0-0.rc6.git0.1.vanilla.knurd.1.fc31.x86_64/build/arch/x86/include/asm/segment.h:266:2:
> error: expected '(' after 'asm'
>         alternative_io ("lsl %[seg],%[p]",

It can be workaround by commenting the following line in 
/lib/modules/5.6.0-0.rc6.git0.1.vanilla.knurd.1.fc31.x86_64/build/include/generated/autoconf.h:

#define CONFIG_CC_HAS_ASM_INLINE 1


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