slab: introduce kmem_cache_zalloc allocator
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Balbir Singh
Quoted 4 lines
No, no, no! I am introducing
kmem_cache_zalloc()because there are existing users in the tree. I plan to kill the slab wrappers from XFS completely which is why I need this. We already have object constructors for what you're describing.Ok, please keep the interface - build
kmem_cache_zalloc()on top of what I suggest.
The benefit of using *zalloc is the ability to skip the memset by using pre-zeroed memory or to use more efficient ways of zeroing a page. Having to check the value of a parameter wouldn't help.
Signature · 2 lines
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF verbreiteten Lügen zu sabotieren.
Quoted 6 lines
Quoted 2 lines
Ok, please keep the interface - build
kmem_cache_zalloc()on top of what I suggest.The benefit of using *zalloc is the ability to skip the memset by using pre-zeroed memory or to use more efficient ways of zeroing a page. Having to check the value of a parameter wouldn't help.
Hmm... the current patch directly does a memset(). Are you talking about possible optimizations to kmem_cache_zalloc()?
Balbir
Quoted 9 lines · Balbir Singh
Quoted 6 lines
Quoted 2 lines
Ok, please keep the interface - build
kmem_cache_zalloc()on top of what I suggest.The benefit of using *zalloc is the ability to skip the memset by using pre-zeroed memory or to use more efficient ways of zeroing a page. Having to check the value of a parameter wouldn't help.
Hmm... the current patch directly does a
memset(). Are you talking about possible optimizations tokmem_cache_zalloc()?
Yes. At least that's what I understand from the whole zalloc process.
Signature · 2 lines
Top 100 things you don't want the sysadmin to say: 4. This won't affect what you're doing.
Quoted 1 line · Bodo Eggert
Yes. At least that's what I understand from the whole zalloc process.
Zalloc does two things: (1) reduce human error and (2) shrink kernel text size. Pre-zeroing is a possible optimization but needs to be measured. It is not necessarily a positive gain due to cache effects.
Pekka