Re: [Patch] statistics infrastructure - update 1

Martin Peschke
2006-05-30T11:22:48Z

Heiko Carstens wrote:
>> case CPU_UP_PREPARE:
>> stat->pdata->ptrs[cpu] = statistic_alloc_ptr(stat, GFP_ATOMIC,
>
> Why not GFP_KERNEL?

I see. Schedule() is permitted in this context. Will change it.

>> + if (!stat->pdata->ptrs[cpu])
>> + return -ENOMEM;
>
> NOTIFY_BAD instead of -ENOMEM, I guess.

Not a bug, but slightly confusing. I think I will clean it up in my
next update patch.

>> break;
>> case CPU_UP_CANCELED:
>> case CPU_DEAD:
>
> I think your merge code (which gets called if CPU_UP_PREPARE fails) expects
> stat->pdata->ptrs[cpu] to be non-zero, right?

That's a bug and needs fixing (just bail out if pointer if zero).

Thanks, Martin