Hi,
    'memzone <RG_MP_log_history> already exists' is not an error for the 
secondary DPDK process.

    DPDK EAL initialization creates a mempool for log history.  This mempool 
creation includes creating a ring based on the memzone named RG_MP_log_history.
    For the secondary DPDK process,  if the mempool for log history creation 
fails because the memzone RG_MP_log_history exits, it looks up the exited 
mempool and reuse it. 
    Please refer to the implementation of rte_eal_common_log_init() function.

    From the logs, it seems your secondary DPDK process has initialized 
successfully.

int
rte_eal_common_log_init(FILE *default_log)
{
        STAILQ_INIT(&log_history);

        /* reserve RTE_LOG_HISTORY*2 elements, so we can dump and
         * keep logging during this time */
        log_history_mp = rte_mempool_create(LOG_HISTORY_MP_NAME, 
RTE_LOG_HISTORY*2,
                                LOG_ELT_SIZE, 0, 0,
                                NULL, NULL,
                                NULL, NULL,
                                SOCKET_ID_ANY, 0);

        if ((log_history_mp == NULL) && 
            ((log_history_mp = rte_mempool_lookup(LOG_HISTORY_MP_NAME)) == 
NULL)){
                RTE_LOG(ERR, EAL, "%s(): cannot create log_history mempool\n",
                        __func__);
                return -1;
        }

        default_log_stream = default_log;
        rte_openlog_stream(default_log);
        return 0;
}


-----Original Message-----
From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of zimeiw
Sent: Saturday, August 30, 2014 7:23 AM
To: dev at dpdk.org
Subject: [dpdk-dev] rte_memzone: memzone_reserve_aligned_thread_unsafe failed 
when running two process at the same time.



hi,


Running primary process, it is successful.

$ sudo ./simple_mp -c 1 -n 1 --socket-mem=64  --proc-type=primary
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 0 on socket 0
EAL: Support maximum 64 logical core(s) by configuration.
EAL: Detected 2 lcore(s)
EAL: Setting up memory...
EAL: Ask a virtual area of 0x26000000 bytes
EAL: Virtual area found at 0x7fffd1200000 (size = 0x26000000)
EAL: Ask a virtual area of 0x2200000 bytes
EAL: Virtual area found at 0x7fffcee00000 (size = 0x2200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffcea00000 (size = 0x200000)
EAL: Ask a virtual area of 0x1a00000 bytes
EAL: Virtual area found at 0x7fffcce00000 (size = 0x1a00000)
EAL: Ask a virtual area of 0x2200000 bytes
EAL: Virtual area found at 0x7fffcaa00000 (size = 0x2200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffca600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffca200000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffc9e00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffc9a00000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffc9600000 (size = 0x200000)
EAL: Ask a virtual area of 0x200000 bytes
EAL: Virtual area found at 0x7fffc9200000 (size = 0x200000)
EAL: Requesting 32 pages of size 2MB from socket 0
EAL: TSC frequency is ~2793683 KHz
EAL: Master core 0 is ready (tid=f7fe4800)
EAL: PCI device 0000:02:01.0 on NUMA socket -1
EAL:   probe driver: 8086:100f rte_em_pmd
EAL:   0000:02:01.0 not managed by UIO driver, skipping
EAL: PCI device 0000:02:06.0 on NUMA socket -1
EAL:   probe driver: 8086:100f rte_em_pmd
EAL:   0000:02:06.0 not managed by UIO driver, skipping
proc primary
APP: Finished Process Init.

simple_mp >


Running secondary process, it is faied for memzone <RG_MP_log_history> already 
exists.
$ sudo ./simple_mp -c 1 -n 1   --proc-type=secondary --socket-mem=1
EAL: Detected lcore 0 as core 0 on socket 0
EAL: Detected lcore 1 as core 0 on socket 0
EAL: Support maximum 64 logical core(s) by configuration.
EAL: Detected 2 lcore(s)
EAL: Setting up memory...
EAL: Analysing 358 files
EAL: Mapped segment 0 of size 0x4000000
EAL: memzone_reserve_aligned_thread_unsafe(): memzone <RG_MP_log_history> 
already exists
RING: Cannot reserve memory
EAL: TSC frequency is ~2793681 KHz
EAL: Master core 0 is ready (tid=f7fe4800)
EAL: PCI device 0000:02:01.0 on NUMA socket -1
EAL:   probe driver: 8086:100f rte_em_pmd
EAL: Cannot find resource for device
EAL: PCI device 0000:02:06.0 on NUMA socket -1
EAL:   probe driver: 8086:100f rte_em_pmd
EAL: Cannot find resource for device
proc secandary
APP: Finished Process Init.

simple_mp >



Reply via email to