Messages in this thread | | | Subject | Re: PATCH 2.3.26: kmalloc GFP_ZERO | From | Jes Sorensen <> | Date | 09 Nov 1999 22:58:22 +0100 |
| |
>>>>> "Jeff" == Jeff Garzik <jgarzik@mandrakesoft.com> writes:
Jeff> If you add "kcalloc" instead of hacking "kmalloc" as I did, Jeff> drivers wanting zeroed pages make the conscious decision of Jeff> calling another function, with a potentially slower path.
I still don't see the point of doing a kcalloc() except for making driver code slightly prettier. You have to remember that full pages grabbed by the mm system do not come out of kmalloc() but get_free_pages().
Jeff> Such a split would also make it easier to enumerate Jeff> architecture-dependent paths. For some architectures may choose Jeff> the default -- kmalloc+memset -- and other archs can choose a Jeff> page-zeroing idle task, all without affecting Jeff> kmalloc/kmem_cache_alloc
It's possible that pre zeroing pages for the mm system might be a win, and if so it is probably a good thing to explore, however we are talking two different things here. In the pre-zeroed cage you don't go through kmalloc and kmem_cache_alloc (SLAB) at all.
Jes
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |