Re: [PATCH v2] debugobjects: scale the static pool size

From: Thomas Gleixner
Date: Tue Nov 20 2018 - 15:56:21 EST


On Tue, 20 Nov 2018, Waiman Long wrote:
> On 11/20/2018 03:14 PM, Qian Cai wrote:
> > static struct debug_obj_descr *descr_test __read_mostly;
>
> The calculation for ODEBUG_POOL_SIZE is somewhat hard to read. Maybe you
> can do something like
>
> #ifdef CONFIG_DEBUG_OBJECTS_WORK
> #define ODEBUG_WORK_PCPU_CNTÂÂÂ 10
> #else
> #define ODEBUG_WORK_PCPU_CNTÂÂÂ 0
> #endif
>
> #ifdef CONFIG_DEBUG_OBJECTS_TIMERS
> #define ODEBUG_TIMERS_PCPU_CNT 10
> #else
> #define ODEBUG_TIMERS_PCPU_CNT 0
> #endif
>
> #define ODEBUG_POOL_SIZE (ODEBUG_DEFAULT_POOL + CONFIG_NR_CPUS * \
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ (ODEBUG_TIMERS_PCPU_CNT + ODEBUG_WORK_PCPU_CNT))

Yes please.

Thanks,

tglx