mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
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
|
||||
|
||||