[Devel] Re: [PATCH 2/6] BC: beancounters core (API)
dev at sw.ru
Wed Aug 23 06:27:25 PDT 2006
Andi Kleen wrote:
> On Wednesday 23 August 2006 13:03, Kirill Korotaev wrote:
>>+extern struct hlist_head bc_hash;
>>+extern spinlock_t bc_hash_lock;
> I wonder who pokes into that hash from other files? Looks a bit dangerous.
it was kernel/ub/proc.c with proc interface :)
however, we removed it from this patchset version, but forgot extern's...
>>+void __put_beancounter(struct beancounter *bc);
>>+static inline void put_beancounter(struct beancounter *bc)
> The wrapper seems pointless too.
yep, almost the same reason :)
> The file could use a overview comment what the various counter
> types actually are.
you mean comment about what resource parameters we introduce?
ok, will add it with each resource patch.
>>+ bc_print_id(bc, uid, sizeof(uid));
>>+ printk(KERN_WARNING "BC %s %s warning: %s "
> Doesn't this need some rate limiting? Or can it be only triggered
> by code bugs?
only due to code bugs.
>>+ bc = &default_beancounter;
>>+ memset(bc, 0, sizeof(default_beancounter));
> You don't trust the BSS to be zero? @)
More information about the Devel