[Devel] [PATCH 5/7] unix: Charge outgoing buffers into cg memory

Pavel Emelyanov xemul at parallels.com
Fri May 29 07:18:42 PDT 2015


For unix sockets there's no such thing as "read buffers" as all
the data is accounted on the send paths. Fortunate enough most
of the stuff is already kmem-auto-charged except one thing --
paged dgram skbs.

Signed-off-by: Pavel Emelyanov <xemul at parallels.com>

---
 net/core/sock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index 7b7c804..e552442 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1767,7 +1767,7 @@ struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len,
 				for (i = 0; i < npages; i++) {
 					struct page *page;
 
-					page = alloc_pages(sk->sk_allocation, 0);
+					page = alloc_kmem_pages(sk->sk_allocation, 0);
 					if (!page) {
 						err = -ENOBUFS;
 						skb_shinfo(skb)->nr_frags = i;
-- 
1.8.3.1





More information about the Devel mailing list