| 2773d39f | 27-Oct-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
eal: initialize log before everything else
In order for all log messages (including CPU mismatch) to come out through the logging library, it must be initialized as early in rte_eal_init() as possib
eal: initialize log before everything else
In order for all log messages (including CPU mismatch) to come out through the logging library, it must be initialized as early in rte_eal_init() as possible on all platforms.
Where it was done before was likely historical, based on the support of non-OS isolated CPU's which required a shared memory buffer. That support was dropped before DPDK was publicly released.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
show more ...
|
| 72bf6da8 | 27-Oct-2024 |
Stephen Hemminger <stephen@networkplumber.org> |
eal: do not log init failure twice
The message already goes through logging, and does not need to be printed on stderr. Message level should be ALERT to match function name.
Signed-off-by: Stephen
eal: do not log init failure twice
The message already goes through logging, and does not need to be printed on stderr. Message level should be ALERT to match function name.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com>
show more ...
|
| dbdf3d55 | 03-Oct-2024 |
Isaac Boukris <iboukris@gmail.com> |
timer: override CPU TSC frequency with OS value
The CPU provided value is often not accurate, allow overriding it based on info from the host OS.
On Linux x86, if the tsc_known_freq cpu flag is mis
timer: override CPU TSC frequency with OS value
The CPU provided value is often not accurate, allow overriding it based on info from the host OS.
On Linux x86, if the tsc_known_freq cpu flag is missing, it means the kernel doesn't trust it and calculates its own. We should do the same to avoid drift.
On Freebsd, we have access to the kernel tsc_hz value, just use it.
Bugzilla ID: 959
Signed-off-by: Isaac Boukris <iboukris@gmail.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| 7268f21a | 03-Oct-2024 |
Isaac Boukris <iboukris@gmail.com> |
timer: improve TSC estimation accuracy
In practice, the frequency is often not a nice round number, while the estimation results are rather accurate, just a couple of KHz away from the kernel's tsc_
timer: improve TSC estimation accuracy
In practice, the frequency is often not a nice round number, while the estimation results are rather accurate, just a couple of KHz away from the kernel's tsc_khz value, so it should suffice.
Rounding to 10MHz can cause a significant drift from real time, up to a second per 10 minutes.
Bugzilla ID: 959
Signed-off-by: Isaac Boukris <iboukris@gmail.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| e168b189 | 10-Jul-2024 |
David Christensen <drc@linux.ibm.com> |
eal: verify MMU type for PPC64
IBM POWER systems support more than one type of memory management unit (MMU). The Power ISA 3.0 specification, which applies to P9 and later CPUs, defined a new Radix
eal: verify MMU type for PPC64
IBM POWER systems support more than one type of memory management unit (MMU). The Power ISA 3.0 specification, which applies to P9 and later CPUs, defined a new Radix MMU which, among other things, allows an anonymous memory page mapping to be converted into a hugepage mapping at a specific address. This is a required feature in DPDK so we need to test the MMU type when POWER systems are used and provide a more useful error message for the user when running on an unsupported system such as P8/P9 on PowerVM.
All architectures other than ppc64le unconditionally report that the MMU is supported. When running with ppc64le on Linux, the MMU is tested and the actual result is returned, while running with ppc64le on FreeBSD unconditionally reports that the MMU is supported to avoid unnecessary breakage until an actual test can be implemented for that environment (i.e. keeps existing behavior without the patch).
Bugzilla ID: 1221
Suggested-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: David Christensen <drc@linux.ibm.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
show more ...
|
| 8f4611d8 | 26-Jun-2024 |
David Marchand <david.marchand@redhat.com> |
eal/linux: lower log level on allocation attempt failure
On a ARM system with only 2MB hugepages configured, EAL emits an error log with allocations larger than 512MB.
Example with testpmd: $ dpdk-
eal/linux: lower log level on allocation attempt failure
On a ARM system with only 2MB hugepages configured, EAL emits an error log with allocations larger than 512MB.
Example with testpmd: $ dpdk-testpmd --in-memory --no-pci --log-level=*:debug -- -i ... EAL: In-memory mode enabled, hugepages of size 33554432 bytes will be allocated anonymously EAL: No free 32768 kB hugepages reported on node 0 EAL: In-memory mode enabled, hugepages of size 65536 bytes will be allocated anonymously EAL: No free 64 kB hugepages reported on node 0 EAL: In-memory mode enabled, hugepages of size 1073741824 bytes will be allocated anonymously EAL: No free 1048576 kB hugepages reported on node 0 ... EAL: Detected memory type: socket_id:0 hugepage_sz:1073741824 EAL: Detected memory type: socket_id:0 hugepage_sz:33554432 EAL: Detected memory type: socket_id:0 hugepage_sz:2097152 EAL: Detected memory type: socket_id:0 hugepage_sz:65536 EAL: Creating 2 segment lists: n_segs:32 socket_id:0 hugepage_sz:1073741824 ... EAL: Creating 2 segment lists: n_segs:1024 socket_id:0 hugepage_sz:33554432 ... EAL: Creating 4 segment lists: n_segs:8192 socket_id:0 hugepage_sz:2097152 ... EAL: Creating 4 segment lists: n_segs:8192 socket_id:0 hugepage_sz:65536 ... EAL: Trying to obtain current memory policy. EAL: Setting policy MPOL_PREFERRED for socket 0 EAL: alloc_seg(): mmap() failed: Cannot allocate memory EAL: Ask a virtual area of 0x40000000 bytes EAL: Virtual area found at 0x140000000 (size = 0x40000000) EAL: attempted to allocate 2 segments, but only 0 were allocated EAL: Restoring previous memory policy: 4 EAL: Trying to obtain current memory policy. EAL: Setting policy MPOL_PREFERRED for socket 0 EAL: eal_memalloc_alloc_seg_bulk(): couldn't find suitable memseg_list EAL: Restoring previous memory policy: 4 EAL: Trying to obtain current memory policy. EAL: Setting policy MPOL_PREFERRED for socket 0 EAL: Restoring previous memory policy: 4 EAL: request: mp_malloc_sync EAL: No shared files mode enabled, IPC is disabled EAL: Heap on socket 0 was expanded by 1064MB ...
The reason is that the memzone allocation (~1GB large) would require 17017 (32kB) segments. However, as displayed in the early logs, a 32kB memory segment list can only host 8192 segments (controlled by the build option RTE_MAX_MEMSEG_PER_LIST).
This log message is misleading as there is no issue in the end: the allocation succeeded with 2MB hugepages.
Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime") Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|