bitkeeper revision 1.1159.79.2 (414c1134FG1zvS9xwv2yPDvyS7W3ig)

Linux scrubs memory before returnign it to Xen, or transferring it to
other domains (e.g., net backend driver). To avoid continual scrubbing during
network transfers, I allocate rx skbuffs from a dedicated slab cache. Pages
only neded to be scrubbed on entry to the cache, which should be ratehr more
occasional than allocs/frees.
Finally, scrubbing can be entirely disabled via a config option under the
'XEN' menu in the 2.4 and 2.6 kernel configurators.
This commit is contained in:
kaf24@freefall.cl.cam.ac.uk committed 2004-09-18 10:43:00 +00:00
1 parent 90d122ec63
commit 0bfc95f5b0
21 files changed
+163 -50

No files matched your search

@@ -1027,19 +1027,18 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
*
* %NULL is returned in there is no free memory.
*/
#ifndef CONFIG_XEN
static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
int gfp_mask)
{
struct sk_buff *skb;
#if defined(CONFIG_XEN)
length = (PAGE_SIZE/2)+1; /* force slab allocater to give us a page */
#endif
skb = alloc_skb(length+16, gfp_mask);
struct sk_buff *skb = alloc_skb(length+16, gfp_mask);
if (skb)
skb_reserve(skb,16);
return skb;
}
#else
extern struct sk_buff *__dev_alloc_skb(unsigned int length, int gfp_mask);
#endif
/**
* dev_alloc_skb - allocate an skbuff for sending
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.