Hi Ferruh, On 05/11/2016 06:39 PM, Ferruh Yigit wrote: > On 5/9/2016 5:13 PM, Olivier Matz wrote: >> --- a/lib/librte_eal/common/eal_common_log.c >> +++ b/lib/librte_eal/common/eal_common_log.c >> @@ -98,9 +98,10 @@ static int history_enabled = 1; >> struct log_cur_msg { >> uint32_t loglevel; /**< log level - see rte_log.h */ >> uint32_t logtype; /**< log type - see rte_log.h */ >> -} __rte_cache_aligned; > > Removing alignment seems not related the main purpose of the patch. Is > this intentional?
Initially, the structure was cache-aligned so each element of the table was stored in a separate cache line, avoiding a lcore accessing its element to polute its neighbors (this was by the way a bit overkill as it's not a performance-sensitive structure). Using a __thread variable instead of a table naturally removes this need because it will be stored in a specific section containing only per-core data. > I have tested with custom code, non-EAL thread have lcore_id value > UINT32_MAX, which is > RTE_MAX_LCORE and rte_log_cur_msg_loglevel gives > default log level as described in commit log. With this patch each > thread gets its own log level. > > Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com> > Thanks for reviewing and testing. Regards, Olivier