Hello, this is my report about my findings: 

mlockall() takes a very short time for different transparent hugepage 
configurations after using the fix in EAL. Log as follows:

****** transparent_hugepage is madvise*******
[root@X6000-C23-3U dpdk-19.11]# strace -T -e trace=mlockall ./build/app/testpmd 
-l 0-1 -n 4 -w 0000:7d:01.0 --file-prefix=rte_lee --log-level=6 -- -i --rxq=1 
--txq=1 --rxd=1024 --rxd=1024
EAL: No available hugepages reported in hugepages-2048kB
EAL: No available hugepages reported in hugepages-32768kB
EAL: No available hugepages reported in hugepages-64kB
EAL: VFIO support initialized
EAL:   using IOMMU type 1 (Type 1)
Interactive-mode selected
mlockall(MCL_CURRENT|MCL_FUTURE)        = 0 <0.014386>

Warning! port-topology=paired and odd forward ports number, the last port will 
pair with itself.

Configuring Port 0 (socket 0)
Port 0: 82:33:17:B1:43:57
Checking link statuses...
Done
Error during enabling promiscuous mode for port 0: Operation not supported - 
ignore
testpmd>
testpmd>
testpmd> quit

Stopping port 0...
Stopping ports...
Done

Shutting down port 0...
Closing ports...
0000:7d:01.0 hns3vf_dev_close(): Close port 0 finished
Done

Bye...
+++ exited with 0 +++

****** transparent_hugepage is never*******
[root@X6000-C23-3U dpdk-19.11]# strace -T -e trace=mlockall ./build/app/testpmd 
-l 0-8 -n 4 -w 0000:7d:01.0 --file-prefix=rte_lee --log-level=6 -- -i --rxq=8 
--txq=8
EAL: No available hugepages reported in hugepages-2048kB
EAL: No available hugepages reported in hugepages-32768kB
EAL: No available hugepages reported in hugepages-64kB
EAL: VFIO support initialized
EAL:   using IOMMU type 1 (Type 1)
Interactive-mode selected
mlockall(MCL_CURRENT|MCL_FUTURE)        = 0 <0.031902>

Warning! port-topology=paired and odd forward ports number, the last port will 
pair with itself.

Configuring Port 0 (socket 0)
Port 0: 1E:46:8C:BC:7A:E7
Checking link statuses...
Done
Error during enabling promiscuous mode for port 0: Operation not supported - 
ignore
testpmd>
testpmd>
testpmd> quit

Stopping port 0...
Stopping ports...
Done

Shutting down port 0...
Closing ports...
0000:7d:01.0 hns3vf_dev_close(): Close port 0 finished
Done

Bye...
+++ exited with 0 +++


****** transparent_hugepage is always *******
[root@X6000-C23-3U dpdk-19.11]# strace -T -e trace=mlockall ./build/app/testpmd 
-l 0-8 -n 4 -w 0000:7d:01.0 --file-prefix=rte_lee --log-level=6 -- -i --rxq=8 
--txq=8
EAL: No available hugepages reported in hugepages-2048kB
EAL: No available hugepages reported in hugepages-32768kB
EAL: No available hugepages reported in hugepages-64kB
EAL: VFIO support initialized
EAL:   using IOMMU type 1 (Type 1)
Interactive-mode selected
mlockall(MCL_CURRENT|MCL_FUTURE)        = 0 <0.017960>

Warning! port-topology=paired and odd forward ports number, the last port will 
pair with itself.

Configuring Port 0 (socket 0)
Port 0: EA:84:12:62:A5:98
Checking link statuses...
Done
Error during enabling promiscuous mode for port 0: Operation not supported - 
ignore
testpmd> quit

Stopping port 0...
Stopping ports...
Done

Shutting down port 0...
Closing ports...
0000:7d:01.0 hns3vf_dev_close(): Close port 0 finished
Done

Bye...
+++ exited with 0 +++















-----邮件原件-----
发件人: David Marchand [mailto:david.march...@redhat.com] 
发送时间: 2020年3月10日 23:28
收件人: humin (Q) <humi...@huawei.com>
抄送: dev@dpdk.org; Zhouchang (Forest) <forest.zhouch...@huawei.com>; Xiedonghui 
<xiedong...@huawei.com>; liudongdong (C) <liudongdo...@huawei.com>; lihuisong 
<lihuis...@huawei.com>; Huwei (Xavier) <huwe...@hisilicon.com>; Burakov, 
Anatoly <anatoly.bura...@intel.com>; Thomas Monjalon <tho...@monjalon.net>; 
Maxime Coquelin <maxime.coque...@redhat.com>
主题: Re: [RFC]app/testpmd: time-consuming question of mlockall function execution

On Fri, Mar 6, 2020 at 6:49 PM David Marchand <david.march...@redhat.com> wrote:
>
> On Wed, Feb 26, 2020 at 4:59 AM humin (Q) <humi...@huawei.com> wrote:
> > We have another question about your patch. It seems that mlockall() also 
> > takes about two seconds after using this patch(about 0.2 seconds before 
> > using this patch), if we use "always" option for transparent hugepage 
> > configration. Is this reasonable and acceptable?
>
> Hard to tell what reasonable/acceptable mean.
> I'd say "it depends" :-).
>
>
> > If that is ok, when will the patch be uploaded to DPDK community?
>
> I sent a RFC earlier, that makes testpmd only lock pages containing text.
> Can you have a try and report your findings?

Let's forget about the change in testpmd.
I came with a different fix in EAL.
Can you have a try?

http://patchwork.dpdk.org/patch/66469/


-- 
David Marchand

Reply via email to