# FreeBSD12: Livecore dump takes longer than FreeBSD11



## sawant.digambar (Aug 11, 2020)

I am observing live-core dump taking longer using FreeBSD12.
For 600M size of core takes 6-7 seconds on FreeBSD11. However on FreeBSD12 it takes 30-40 seconds.

Dtrace shows that the function “bus_dma_run_filter” is called 5804 times in FreeBSD12 as compared 2 in FreeBSD11.

return : proc name kern_dump_proc 2436


```
3 -> bus_dma_run_filter
kernel`bounce_bus_dmamap_load_ma+0x12b
kernel`_bus_dmamap_load_bio+0x102
kernel`bus_dmamap_load_ccb+0x92
kernel`ata_dmaload+0x11b
kernel`ata_begin_transaction+0x105
kernel`ataaction+0x998
kernel`xpt_run_devq+0x46a
kernel`xpt_action_default+0x7fa
kernel`adastart+0x96a
kernel`xpt_run_allocq+0x182
kernel`adastrategy+0x88
kernel`g_disk_start+0x36e
kernel`g_io_request+0x28b
kernel`g_part_start+0xf9
kernel`g_io_request+0x28b
kernel`g_io_request+0x28b
kernel`ufs_strategy+0x83
kernel`VOP_STRATEGY_APV+0x7b
kernel`bufstrategy+0x2c
kernel`bufwrite+0x189
```
Why in FreeBSD12 calling bounce_buf/bus_dma_run_filter path after adastrategy()?
=====


----------



## rootbert (Aug 13, 2020)

interesting ... however, this is probably better suited in the mailing lists


----------



## sawant.digambar (Aug 17, 2020)

Additional info:
We have a live core implementation that leverages the existing dump infrastructure, we simply set up a dumper to write to an open file.

 # sysctl kern.disks
kern.disks: da0 ada0 cd0
 # sysctl kern.geom.disk.da0.flags
kern.geom.disk.da0.flags: ac<CANDELETE,CANFLUSHCACHE,DIRECTCOMPLETION,CANZONE>
 # sysctl kern.geom.disk.ada0.flags
kern.geom.disk.ada0.flags: be<OPEN,CANDELETE,CANFLUSHCACHE,UNMAPPEDBIO,DIRECTCOMPLETION,CANZONE>
 # sysctl kern.geom.disk.cd0.flags
kern.geom.disk.cd0.flags: 0

----
gpart list
. Name: ada0p3
   Mediasize: 21474836480 (20G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 24576
   Mode: r1w1e2
   efimedia: HD(3,GPT,91XXXXXXXXXXXXX81b,0x800030,0x2800000)
   rawuuid: 91XXXXXXXXXXXXXXX-81b
   rawtype: 516eXXXXXXXXXXXXX2b
   label: XXXX
   length: 21474836480
   offset: 4294991872
   type: freebsd-ufs
   index: 3
   end: 50331695
   start: 8388656
==

grep ada0 /var/run/dmesg.boot
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <QEMU HARDDISK 2.5+> ATA-7 device
ada0: Serial Number QM00001
ada0: 16.700MB/s transfers (WDMA2, PIO 8192bytes)
ada0: 27649MB (56625152 512 byte sectors)


----------

