netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
       [not found] <1322371662-26166-1-git-send-email-amwang@redhat.com>
@ 2011-11-27  5:27 ` Cong Wang
  2011-11-27  6:12   ` David Miller
                     ` (3 more replies)
  2011-11-27  5:27 ` [PATCH 28/62] vhost: " Cong Wang
                   ` (3 subsequent siblings)
  4 siblings, 4 replies; 14+ messages in thread
From: Cong Wang @ 2011-11-27  5:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Cong Wang, Jiri Pirko, e1000-devel, Dean Nelson, Bruce Allan,
	Jesse Brandeburg, David S. Miller, John Ronciak, netdev, akpm,
	Ian Campbell


Signed-off-by: Cong Wang <amwang@redhat.com>
---
 drivers/net/ethernet/intel/e1000/e1000_main.c |    6 ++----
 drivers/net/ethernet/intel/e1000e/netdev.c    |   10 ++++------
 drivers/net/ethernet/sun/cassini.c            |    4 ++--
 3 files changed, 8 insertions(+), 12 deletions(-)
 create mode 100644 drivers/net/team/Module.symvers

diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index cf480b5..b194beb 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -3878,11 +3878,9 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
 				if (length <= copybreak &&
 				    skb_tailroom(skb) >= length) {
 					u8 *vaddr;
-					vaddr = kmap_atomic(buffer_info->page,
-					                    KM_SKB_DATA_SOFTIRQ);
+					vaddr = kmap_atomic(buffer_info->page);
 					memcpy(skb_tail_pointer(skb), vaddr, length);
-					kunmap_atomic(vaddr,
-					              KM_SKB_DATA_SOFTIRQ);
+					kunmap_atomic(vaddr);
 					/* re-use the page, so don't erase
 					 * buffer_info->page */
 					skb_put(skb, length);
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index a855db1..8603c87 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1272,9 +1272,9 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
 			 */
 			dma_sync_single_for_cpu(&pdev->dev, ps_page->dma,
 						PAGE_SIZE, DMA_FROM_DEVICE);
-			vaddr = kmap_atomic(ps_page->page, KM_SKB_DATA_SOFTIRQ);
+			vaddr = kmap_atomic(ps_page->page);
 			memcpy(skb_tail_pointer(skb), vaddr, l1);
-			kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
+			kunmap_atomic(vaddr);
 			dma_sync_single_for_device(&pdev->dev, ps_page->dma,
 						   PAGE_SIZE, DMA_FROM_DEVICE);
 
@@ -1465,12 +1465,10 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
 				if (length <= copybreak &&
 				    skb_tailroom(skb) >= length) {
 					u8 *vaddr;
-					vaddr = kmap_atomic(buffer_info->page,
-					                   KM_SKB_DATA_SOFTIRQ);
+					vaddr = kmap_atomic(buffer_info->page);
 					memcpy(skb_tail_pointer(skb), vaddr,
 					       length);
-					kunmap_atomic(vaddr,
-					              KM_SKB_DATA_SOFTIRQ);
+					kunmap_atomic(vaddr);
 					/* re-use the page, so don't erase
 					 * buffer_info->page */
 					skb_put(skb, length);
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index fd40988..c22a195 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -104,8 +104,8 @@
 #include <asm/byteorder.h>
 #include <asm/uaccess.h>
 
-#define cas_page_map(x)      kmap_atomic((x), KM_SKB_DATA_SOFTIRQ)
-#define cas_page_unmap(x)    kunmap_atomic((x), KM_SKB_DATA_SOFTIRQ)
+#define cas_page_map(x)      kmap_atomic((x))
+#define cas_page_unmap(x)    kunmap_atomic((x))
 #define CAS_NCPUS            num_online_cpus()
 
 #define cas_skb_release(x)  netif_rx(x)
diff --git a/drivers/net/team/Module.symvers b/drivers/net/team/Module.symvers
new file mode 100644
index 0000000..e69de29
-- 
1.7.4.4


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 28/62] vhost: remove the second argument of k[un]map_atomic()
       [not found] <1322371662-26166-1-git-send-email-amwang@redhat.com>
  2011-11-27  5:27 ` [PATCH 21/62] net: remove the second argument of k[un]map_atomic() Cong Wang
@ 2011-11-27  5:27 ` Cong Wang
  2011-11-27  5:27 ` [PATCH 53/62] net: " Cong Wang
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Cong Wang @ 2011-11-27  5:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, Cong Wang, Michael S. Tsirkin, kvm, virtualization, netdev


Signed-off-by: Cong Wang <amwang@redhat.com>
---
 drivers/vhost/vhost.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c14c42b..bdb2d64 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -937,9 +937,9 @@ static int set_bit_to_user(int nr, void __user *addr)
 	if (r < 0)
 		return r;
 	BUG_ON(r != 1);
-	base = kmap_atomic(page, KM_USER0);
+	base = kmap_atomic(page);
 	set_bit(bit, base);
-	kunmap_atomic(base, KM_USER0);
+	kunmap_atomic(base);
 	set_page_dirty_lock(page);
 	put_page(page);
 	return 0;
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 53/62] net: remove the second argument of k[un]map_atomic()
       [not found] <1322371662-26166-1-git-send-email-amwang@redhat.com>
  2011-11-27  5:27 ` [PATCH 21/62] net: remove the second argument of k[un]map_atomic() Cong Wang
  2011-11-27  5:27 ` [PATCH 28/62] vhost: " Cong Wang
@ 2011-11-27  5:27 ` Cong Wang
  2011-11-27  6:12   ` David Miller
  2011-11-27  5:27 ` [PATCH 54/62] rds: " Cong Wang
  2011-11-27  5:27 ` [PATCH 55/62] sunrpc: " Cong Wang
  4 siblings, 1 reply; 14+ messages in thread
From: Cong Wang @ 2011-11-27  5:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, Cong Wang, David S. Miller, Ian Campbell, netdev


Signed-off-by: Cong Wang <amwang@redhat.com>
---
 net/core/kmap_skb.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/kmap_skb.h b/net/core/kmap_skb.h
index 81e1ed7..52d0a44 100644
--- a/net/core/kmap_skb.h
+++ b/net/core/kmap_skb.h
@@ -7,12 +7,12 @@ static inline void *kmap_skb_frag(const skb_frag_t *frag)
 
 	local_bh_disable();
 #endif
-	return kmap_atomic(skb_frag_page(frag), KM_SKB_DATA_SOFTIRQ);
+	return kmap_atomic(skb_frag_page(frag));
 }
 
 static inline void kunmap_skb_frag(void *vaddr)
 {
-	kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
+	kunmap_atomic(vaddr);
 #ifdef CONFIG_HIGHMEM
 	local_bh_enable();
 #endif
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 54/62] rds: remove the second argument of k[un]map_atomic()
       [not found] <1322371662-26166-1-git-send-email-amwang@redhat.com>
                   ` (2 preceding siblings ...)
  2011-11-27  5:27 ` [PATCH 53/62] net: " Cong Wang
@ 2011-11-27  5:27 ` Cong Wang
  2011-11-27  6:13   ` David Miller
  2011-11-27  5:27 ` [PATCH 55/62] sunrpc: " Cong Wang
  4 siblings, 1 reply; 14+ messages in thread
From: Cong Wang @ 2011-11-27  5:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, Cong Wang, Venkat Venkatsubra, David S. Miller, rds-devel,
	netdev


Signed-off-by: Cong Wang <amwang@redhat.com>
---
 net/rds/ib_recv.c  |    7 +++----
 net/rds/info.c     |    6 +++---
 net/rds/iw_recv.c  |    7 +++----
 net/rds/loop.c     |    2 +-
 net/rds/rds.h      |    2 +-
 net/rds/recv.c     |    2 +-
 net/rds/tcp_recv.c |   11 ++++-------
 7 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index e29e0ca..744a00d 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -763,7 +763,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
 		to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
 		BUG_ON(to_copy & 7); /* Must be 64bit aligned. */
 
-		addr = kmap_atomic(sg_page(&frag->f_sg), KM_SOFTIRQ0);
+		addr = kmap_atomic(sg_page(&frag->f_sg));
 
 		src = addr + frag_off;
 		dst = (void *)map->m_page_addrs[map_page] + map_off;
@@ -773,7 +773,7 @@ static void rds_ib_cong_recv(struct rds_connection *conn,
 			uncongested |= ~(*src) & *dst;
 			*dst++ = *src++;
 		}
-		kunmap_atomic(addr, KM_SOFTIRQ0);
+		kunmap_atomic(addr);
 
 		copied += to_copy;
 
@@ -919,8 +919,7 @@ static void rds_ib_process_recv(struct rds_connection *conn,
 			rds_ib_cong_recv(conn, ibinc);
 		else {
 			rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr,
-					  &ibinc->ii_inc, GFP_ATOMIC,
-					  KM_SOFTIRQ0);
+					  &ibinc->ii_inc, GFP_ATOMIC);
 			state->ack_next = be64_to_cpu(hdr->h_sequence);
 			state->ack_next_valid = 1;
 		}
diff --git a/net/rds/info.c b/net/rds/info.c
index f1c016c..9a6b4f6 100644
--- a/net/rds/info.c
+++ b/net/rds/info.c
@@ -104,7 +104,7 @@ EXPORT_SYMBOL_GPL(rds_info_deregister_func);
 void rds_info_iter_unmap(struct rds_info_iterator *iter)
 {
 	if (iter->addr) {
-		kunmap_atomic(iter->addr, KM_USER0);
+		kunmap_atomic(iter->addr);
 		iter->addr = NULL;
 	}
 }
@@ -119,7 +119,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
 
 	while (bytes) {
 		if (!iter->addr)
-			iter->addr = kmap_atomic(*iter->pages, KM_USER0);
+			iter->addr = kmap_atomic(*iter->pages);
 
 		this = min(bytes, PAGE_SIZE - iter->offset);
 
@@ -134,7 +134,7 @@ void rds_info_copy(struct rds_info_iterator *iter, void *data,
 		iter->offset += this;
 
 		if (iter->offset == PAGE_SIZE) {
-			kunmap_atomic(iter->addr, KM_USER0);
+			kunmap_atomic(iter->addr);
 			iter->addr = NULL;
 			iter->offset = 0;
 			iter->pages++;
diff --git a/net/rds/iw_recv.c b/net/rds/iw_recv.c
index 5e57347..0bd9b5e 100644
--- a/net/rds/iw_recv.c
+++ b/net/rds/iw_recv.c
@@ -598,7 +598,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn,
 		to_copy = min(RDS_FRAG_SIZE - frag_off, PAGE_SIZE - map_off);
 		BUG_ON(to_copy & 7); /* Must be 64bit aligned. */
 
-		addr = kmap_atomic(frag->f_page, KM_SOFTIRQ0);
+		addr = kmap_atomic(frag->f_page);
 
 		src = addr + frag_off;
 		dst = (void *)map->m_page_addrs[map_page] + map_off;
@@ -608,7 +608,7 @@ static void rds_iw_cong_recv(struct rds_connection *conn,
 			uncongested |= ~(*src) & *dst;
 			*dst++ = *src++;
 		}
-		kunmap_atomic(addr, KM_SOFTIRQ0);
+		kunmap_atomic(addr);
 
 		copied += to_copy;
 
@@ -754,8 +754,7 @@ static void rds_iw_process_recv(struct rds_connection *conn,
 			rds_iw_cong_recv(conn, iwinc);
 		else {
 			rds_recv_incoming(conn, conn->c_faddr, conn->c_laddr,
-					  &iwinc->ii_inc, GFP_ATOMIC,
-					  KM_SOFTIRQ0);
+					  &iwinc->ii_inc, GFP_ATOMIC);
 			state->ack_next = be64_to_cpu(hdr->h_sequence);
 			state->ack_next_valid = 1;
 		}
diff --git a/net/rds/loop.c b/net/rds/loop.c
index bca6761..87ff2a8 100644
--- a/net/rds/loop.c
+++ b/net/rds/loop.c
@@ -79,7 +79,7 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm,
 	rds_message_addref(rm);
 
 	rds_recv_incoming(conn, conn->c_laddr, conn->c_faddr, &rm->m_inc,
-			  GFP_KERNEL, KM_USER0);
+			  GFP_KERNEL);
 
 	rds_send_drop_acked(conn, be64_to_cpu(rm->m_inc.i_hdr.h_sequence),
 			    NULL);
diff --git a/net/rds/rds.h b/net/rds/rds.h
index 7eaba18..ec1d731 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -704,7 +704,7 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
 		  __be32 saddr);
 void rds_inc_put(struct rds_incoming *inc);
 void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
-		       struct rds_incoming *inc, gfp_t gfp, enum km_type km);
+		       struct rds_incoming *inc, gfp_t gfp);
 int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
 		size_t size, int msg_flags);
 void rds_clear_recv_queue(struct rds_sock *rs);
diff --git a/net/rds/recv.c b/net/rds/recv.c
index bc3f8cd..5c6e9f1 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -155,7 +155,7 @@ static void rds_recv_incoming_exthdrs(struct rds_incoming *inc, struct rds_sock
  * tell us which roles the addrs in the conn are playing for this message.
  */
 void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
-		       struct rds_incoming *inc, gfp_t gfp, enum km_type km)
+		       struct rds_incoming *inc, gfp_t gfp)
 {
 	struct rds_sock *rs = NULL;
 	struct sock *sk;
diff --git a/net/rds/tcp_recv.c b/net/rds/tcp_recv.c
index 78205e2..6243258 100644
--- a/net/rds/tcp_recv.c
+++ b/net/rds/tcp_recv.c
@@ -169,7 +169,6 @@ static void rds_tcp_cong_recv(struct rds_connection *conn,
 struct rds_tcp_desc_arg {
 	struct rds_connection *conn;
 	gfp_t gfp;
-	enum km_type km;
 };
 
 static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb,
@@ -255,7 +254,7 @@ static int rds_tcp_data_recv(read_descriptor_t *desc, struct sk_buff *skb,
 			else
 				rds_recv_incoming(conn, conn->c_faddr,
 						  conn->c_laddr, &tinc->ti_inc,
-						  arg->gfp, arg->km);
+						  arg->gfp);
 
 			tc->t_tinc_hdr_rem = sizeof(struct rds_header);
 			tc->t_tinc_data_rem = 0;
@@ -272,8 +271,7 @@ out:
 }
 
 /* the caller has to hold the sock lock */
-static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
-			     enum km_type km)
+static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp)
 {
 	struct rds_tcp_connection *tc = conn->c_transport_data;
 	struct socket *sock = tc->t_sock;
@@ -283,7 +281,6 @@ static int rds_tcp_read_sock(struct rds_connection *conn, gfp_t gfp,
 	/* It's like glib in the kernel! */
 	arg.conn = conn;
 	arg.gfp = gfp;
-	arg.km = km;
 	desc.arg.data = &arg;
 	desc.error = 0;
 	desc.count = 1; /* give more than one skb per call */
@@ -311,7 +308,7 @@ int rds_tcp_recv(struct rds_connection *conn)
 	rdsdebug("recv worker conn %p tc %p sock %p\n", conn, tc, sock);
 
 	lock_sock(sock->sk);
-	ret = rds_tcp_read_sock(conn, GFP_KERNEL, KM_USER0);
+	ret = rds_tcp_read_sock(conn, GFP_KERNEL);
 	release_sock(sock->sk);
 
 	return ret;
@@ -336,7 +333,7 @@ void rds_tcp_data_ready(struct sock *sk, int bytes)
 	ready = tc->t_orig_data_ready;
 	rds_tcp_stats_inc(s_tcp_data_ready_calls);
 
-	if (rds_tcp_read_sock(conn, GFP_ATOMIC, KM_SOFTIRQ0) == -ENOMEM)
+	if (rds_tcp_read_sock(conn, GFP_ATOMIC) == -ENOMEM)
 		queue_delayed_work(rds_wq, &conn->c_recv_w, 0);
 out:
 	read_unlock_bh(&sk->sk_callback_lock);
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 55/62] sunrpc: remove the second argument of k[un]map_atomic()
       [not found] <1322371662-26166-1-git-send-email-amwang@redhat.com>
                   ` (3 preceding siblings ...)
  2011-11-27  5:27 ` [PATCH 54/62] rds: " Cong Wang
@ 2011-11-27  5:27 ` Cong Wang
  4 siblings, 0 replies; 14+ messages in thread
From: Cong Wang @ 2011-11-27  5:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, Cong Wang, J. Bruce Fields, Neil Brown, Trond Myklebust,
	David S. Miller, Tom Tucker, linux-nfs, netdev


Signed-off-by: Cong Wang <amwang@redhat.com>
---
 net/sunrpc/auth_gss/gss_krb5_wrap.c |    4 ++--
 net/sunrpc/socklib.c                |    4 ++--
 net/sunrpc/xdr.c                    |   20 ++++++++++----------
 net/sunrpc/xprtrdma/rpc_rdma.c      |    8 ++++----
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/net/sunrpc/auth_gss/gss_krb5_wrap.c b/net/sunrpc/auth_gss/gss_krb5_wrap.c
index 2763e3e..38f388c 100644
--- a/net/sunrpc/auth_gss/gss_krb5_wrap.c
+++ b/net/sunrpc/auth_gss/gss_krb5_wrap.c
@@ -82,9 +82,9 @@ gss_krb5_remove_padding(struct xdr_buf *buf, int blocksize)
 					>>PAGE_CACHE_SHIFT;
 		unsigned int offset = (buf->page_base + len - 1)
 					& (PAGE_CACHE_SIZE - 1);
-		ptr = kmap_atomic(buf->pages[last], KM_USER0);
+		ptr = kmap_atomic(buf->pages[last]);
 		pad = *(ptr + offset);
-		kunmap_atomic(ptr, KM_USER0);
+		kunmap_atomic(ptr);
 		goto out;
 	} else
 		len -= buf->page_len;
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c
index 145e6784..0a648c5 100644
--- a/net/sunrpc/socklib.c
+++ b/net/sunrpc/socklib.c
@@ -114,7 +114,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
 		}
 
 		len = PAGE_CACHE_SIZE;
-		kaddr = kmap_atomic(*ppage, KM_SKB_SUNRPC_DATA);
+		kaddr = kmap_atomic(*ppage);
 		if (base) {
 			len -= base;
 			if (pglen < len)
@@ -127,7 +127,7 @@ ssize_t xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct
 			ret = copy_actor(desc, kaddr, len);
 		}
 		flush_dcache_page(*ppage);
-		kunmap_atomic(kaddr, KM_SKB_SUNRPC_DATA);
+		kunmap_atomic(kaddr);
 		copied += ret;
 		if (ret != len || !desc->count)
 			goto out;
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 277ebd4..c04aff8 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -122,9 +122,9 @@ xdr_terminate_string(struct xdr_buf *buf, const u32 len)
 {
 	char *kaddr;
 
-	kaddr = kmap_atomic(buf->pages[0], KM_USER0);
+	kaddr = kmap_atomic(buf->pages[0]);
 	kaddr[buf->page_base + len] = '\0';
-	kunmap_atomic(kaddr, KM_USER0);
+	kunmap_atomic(kaddr);
 }
 EXPORT_SYMBOL_GPL(xdr_terminate_string);
 
@@ -232,12 +232,12 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
 		pgto_base -= copy;
 		pgfrom_base -= copy;
 
-		vto = kmap_atomic(*pgto, KM_USER0);
-		vfrom = kmap_atomic(*pgfrom, KM_USER1);
+		vto = kmap_atomic(*pgto);
+		vfrom = kmap_atomic(*pgfrom);
 		memmove(vto + pgto_base, vfrom + pgfrom_base, copy);
 		flush_dcache_page(*pgto);
-		kunmap_atomic(vfrom, KM_USER1);
-		kunmap_atomic(vto, KM_USER0);
+		kunmap_atomic(vfrom);
+		kunmap_atomic(vto);
 
 	} while ((len -= copy) != 0);
 }
@@ -267,9 +267,9 @@ _copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
 		if (copy > len)
 			copy = len;
 
-		vto = kmap_atomic(*pgto, KM_USER0);
+		vto = kmap_atomic(*pgto);
 		memcpy(vto + pgbase, p, copy);
-		kunmap_atomic(vto, KM_USER0);
+		kunmap_atomic(vto);
 
 		len -= copy;
 		if (len == 0)
@@ -311,9 +311,9 @@ _copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
 		if (copy > len)
 			copy = len;
 
-		vfrom = kmap_atomic(*pgfrom, KM_USER0);
+		vfrom = kmap_atomic(*pgfrom);
 		memcpy(p, vfrom + pgbase, copy);
-		kunmap_atomic(vfrom, KM_USER0);
+		kunmap_atomic(vfrom);
 
 		pgbase += copy;
 		if (pgbase == PAGE_CACHE_SIZE) {
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c
index 554d081..1776e57 100644
--- a/net/sunrpc/xprtrdma/rpc_rdma.c
+++ b/net/sunrpc/xprtrdma/rpc_rdma.c
@@ -338,9 +338,9 @@ rpcrdma_inline_pullup(struct rpc_rqst *rqst, int pad)
 			curlen = copy_len;
 		dprintk("RPC:       %s: page %d destp 0x%p len %d curlen %d\n",
 			__func__, i, destp, copy_len, curlen);
-		srcp = kmap_atomic(ppages[i], KM_SKB_SUNRPC_DATA);
+		srcp = kmap_atomic(ppages[i]);
 		memcpy(destp, srcp+page_base, curlen);
-		kunmap_atomic(srcp, KM_SKB_SUNRPC_DATA);
+		kunmap_atomic(srcp);
 		rqst->rq_svec[0].iov_len += curlen;
 		destp += curlen;
 		copy_len -= curlen;
@@ -639,10 +639,10 @@ rpcrdma_inline_fixup(struct rpc_rqst *rqst, char *srcp, int copy_len, int pad)
 			dprintk("RPC:       %s: page %d"
 				" srcp 0x%p len %d curlen %d\n",
 				__func__, i, srcp, copy_len, curlen);
-			destp = kmap_atomic(ppages[i], KM_SKB_SUNRPC_DATA);
+			destp = kmap_atomic(ppages[i]);
 			memcpy(destp + page_base, srcp, curlen);
 			flush_dcache_page(ppages[i]);
-			kunmap_atomic(destp, KM_SKB_SUNRPC_DATA);
+			kunmap_atomic(destp);
 			srcp += curlen;
 			copy_len -= curlen;
 			if (copy_len == 0)
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
  2011-11-27  5:27 ` [PATCH 21/62] net: remove the second argument of k[un]map_atomic() Cong Wang
@ 2011-11-27  6:12   ` David Miller
  2011-11-27  8:07   ` Eric Dumazet
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-11-27  6:12 UTC (permalink / raw)
  To: amwang
  Cc: ian.campbell, jpirko, e1000-devel, dnelson, bruce.w.allan,
	jesse.brandeburg, linux-kernel, john.ronciak, netdev, akpm

From: Cong Wang <amwang@redhat.com>
Date: Sun, 27 Nov 2011 13:27:01 +0800

> Signed-off-by: Cong Wang <amwang@redhat.com>

Acked-by: David S. Miller <davem@davemloft.net>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 53/62] net: remove the second argument of k[un]map_atomic()
  2011-11-27  5:27 ` [PATCH 53/62] net: " Cong Wang
@ 2011-11-27  6:12   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-11-27  6:12 UTC (permalink / raw)
  To: amwang; +Cc: linux-kernel, akpm, ian.campbell, netdev

From: Cong Wang <amwang@redhat.com>
Date: Sun, 27 Nov 2011 13:27:33 +0800

> Signed-off-by: Cong Wang <amwang@redhat.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 54/62] rds: remove the second argument of k[un]map_atomic()
  2011-11-27  5:27 ` [PATCH 54/62] rds: " Cong Wang
@ 2011-11-27  6:13   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2011-11-27  6:13 UTC (permalink / raw)
  To: amwang; +Cc: linux-kernel, akpm, venkat.x.venkatsubra, rds-devel, netdev

From: Cong Wang <amwang@redhat.com>
Date: Sun, 27 Nov 2011 13:27:34 +0800

> Signed-off-by: Cong Wang <amwang@redhat.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
  2011-11-27  5:27 ` [PATCH 21/62] net: remove the second argument of k[un]map_atomic() Cong Wang
  2011-11-27  6:12   ` David Miller
@ 2011-11-27  8:07   ` Eric Dumazet
  2011-11-28 18:06     ` Alexander Duyck
  2011-11-28  7:39   ` Cong Wang
  2011-11-28  7:48   ` [UPDATED PATCH " Cong Wang
  3 siblings, 1 reply; 14+ messages in thread
From: Eric Dumazet @ 2011-11-27  8:07 UTC (permalink / raw)
  To: Cong Wang
  Cc: Jiri Pirko, Ian Campbell, David S. Miller, e1000-devel,
	Dean Nelson, Bruce Allan, Jesse Brandeburg, linux-kernel,
	John Ronciak, netdev, akpm, Peter

Le dimanche 27 novembre 2011 à 13:27 +0800, Cong Wang a écrit :
> Signed-off-by: Cong Wang <amwang@redhat.com>
> ---

> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index cf480b5..b194beb 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -3878,11 +3878,9 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
>  				if (length <= copybreak &&
>  				    skb_tailroom(skb) >= length) {
>  					u8 *vaddr;
> -					vaddr = kmap_atomic(buffer_info->page,
> -					                    KM_SKB_DATA_SOFTIRQ);
> +					vaddr = kmap_atomic(buffer_info->page);
>  					memcpy(skb_tail_pointer(skb), vaddr, length);
> -					kunmap_atomic(vaddr,
> -					              KM_SKB_DATA_SOFTIRQ);
> +					kunmap_atomic(vaddr);
>  					/* re-use the page, so don't erase
>  					 * buffer_info->page */
>  					skb_put(skb, length);
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index a855db1..8603c87 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -1272,9 +1272,9 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
>  			 */
>  			dma_sync_single_for_cpu(&pdev->dev, ps_page->dma,
>  						PAGE_SIZE, DMA_FROM_DEVICE);
> -			vaddr = kmap_atomic(ps_page->page, KM_SKB_DATA_SOFTIRQ);
> +			vaddr = kmap_atomic(ps_page->page);
>  			memcpy(skb_tail_pointer(skb), vaddr, l1);
> -			kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
> +			kunmap_atomic(vaddr);
>  			dma_sync_single_for_device(&pdev->dev, ps_page->dma,
>  						   PAGE_SIZE, DMA_FROM_DEVICE);
>  
> @@ -1465,12 +1465,10 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
>  				if (length <= copybreak &&
>  				    skb_tailroom(skb) >= length) {
>  					u8 *vaddr;
> -					vaddr = kmap_atomic(buffer_info->page,
> -					                   KM_SKB_DATA_SOFTIRQ);
> +					vaddr = kmap_atomic(buffer_info->page);
>  					memcpy(skb_tail_pointer(skb), vaddr,
>  					       length);
> -					kunmap_atomic(vaddr,
> -					              KM_SKB_DATA_SOFTIRQ);
> +					kunmap_atomic(vaddr);
>  					/* re-use the page, so don't erase
>  					 * buffer_info->page */
>  					skb_put(skb, length);

But why are these drivers using kmap_atomic() in first place, since
their fragments are allocated in regular zone (GFP_ATOMIC or
GFP_KERNEL) ?





------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
  2011-11-27  5:27 ` [PATCH 21/62] net: remove the second argument of k[un]map_atomic() Cong Wang
  2011-11-27  6:12   ` David Miller
  2011-11-27  8:07   ` Eric Dumazet
@ 2011-11-28  7:39   ` Cong Wang
  2011-11-28  7:48   ` [UPDATED PATCH " Cong Wang
  3 siblings, 0 replies; 14+ messages in thread
From: Cong Wang @ 2011-11-28  7:39 UTC (permalink / raw)
  To: Cong Wang
  Cc: Jiri Pirko, Ian Campbell, David S. Miller, e1000-devel,
	Dean Nelson, Bruce Allan, Jesse Brandeburg, linux-kernel,
	John Ronciak, netdev, akpm

于 2011年11月27日 13:27, Cong Wang 写道:
> Signed-off-by: Cong Wang<amwang@redhat.com>
...
>   create mode 100644 drivers/net/team/Module.symvers

This piece is not correct, I will send an updated patch.

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [UPDATED PATCH 21/62] net: remove the second argument of k[un]map_atomic()
  2011-11-27  5:27 ` [PATCH 21/62] net: remove the second argument of k[un]map_atomic() Cong Wang
                     ` (2 preceding siblings ...)
  2011-11-28  7:39   ` Cong Wang
@ 2011-11-28  7:48   ` Cong Wang
  3 siblings, 0 replies; 14+ messages in thread
From: Cong Wang @ 2011-11-28  7:48 UTC (permalink / raw)
  To: linux-kernel
  Cc: Cong Wang, Jiri Pirko, e1000-devel, Dean Nelson, Bruce Allan,
	Jesse Brandeburg, David S. Miller, John Ronciak, netdev, akpm,
	Ian Campbell

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
 drivers/net/ethernet/intel/e1000/e1000_main.c |    6 ++----
 drivers/net/ethernet/intel/e1000e/netdev.c    |   10 ++++------
 drivers/net/ethernet/sun/cassini.c            |    4 ++--
 3 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index cf480b5..b194beb 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -3878,11 +3878,9 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
 				if (length <= copybreak &&
 				    skb_tailroom(skb) >= length) {
 					u8 *vaddr;
-					vaddr = kmap_atomic(buffer_info->page,
-					                    KM_SKB_DATA_SOFTIRQ);
+					vaddr = kmap_atomic(buffer_info->page);
 					memcpy(skb_tail_pointer(skb), vaddr, length);
-					kunmap_atomic(vaddr,
-					              KM_SKB_DATA_SOFTIRQ);
+					kunmap_atomic(vaddr);
 					/* re-use the page, so don't erase
 					 * buffer_info->page */
 					skb_put(skb, length);
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index a855db1..8603c87 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1272,9 +1272,9 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
 			 */
 			dma_sync_single_for_cpu(&pdev->dev, ps_page->dma,
 						PAGE_SIZE, DMA_FROM_DEVICE);
-			vaddr = kmap_atomic(ps_page->page, KM_SKB_DATA_SOFTIRQ);
+			vaddr = kmap_atomic(ps_page->page);
 			memcpy(skb_tail_pointer(skb), vaddr, l1);
-			kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
+			kunmap_atomic(vaddr);
 			dma_sync_single_for_device(&pdev->dev, ps_page->dma,
 						   PAGE_SIZE, DMA_FROM_DEVICE);
 
@@ -1465,12 +1465,10 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
 				if (length <= copybreak &&
 				    skb_tailroom(skb) >= length) {
 					u8 *vaddr;
-					vaddr = kmap_atomic(buffer_info->page,
-					                   KM_SKB_DATA_SOFTIRQ);
+					vaddr = kmap_atomic(buffer_info->page);
 					memcpy(skb_tail_pointer(skb), vaddr,
 					       length);
-					kunmap_atomic(vaddr,
-					              KM_SKB_DATA_SOFTIRQ);
+					kunmap_atomic(vaddr);
 					/* re-use the page, so don't erase
 					 * buffer_info->page */
 					skb_put(skb, length);
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c
index fd40988..c22a195 100644
--- a/drivers/net/ethernet/sun/cassini.c
+++ b/drivers/net/ethernet/sun/cassini.c
@@ -104,8 +104,8 @@
 #include <asm/byteorder.h>
 #include <asm/uaccess.h>
 
-#define cas_page_map(x)      kmap_atomic((x), KM_SKB_DATA_SOFTIRQ)
-#define cas_page_unmap(x)    kunmap_atomic((x), KM_SKB_DATA_SOFTIRQ)
+#define cas_page_map(x)      kmap_atomic((x))
+#define cas_page_unmap(x)    kunmap_atomic((x))
 #define CAS_NCPUS            num_online_cpus()
 
 #define cas_skb_release(x)  netif_rx(x)
-- 
1.7.4.4


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 54/62] rds: remove the second argument of k[un]map_atomic()
@ 2011-11-28 15:28 Venkat Venkatsubra
  0 siblings, 0 replies; 14+ messages in thread
From: Venkat Venkatsubra @ 2011-11-28 15:28 UTC (permalink / raw)
  To: davem; +Cc: netdev, rds-devel, akpm, linux-kernel, amwang

From: Cong Wang <amwang@redhat.com>
Date: Sun, 27 Nov 2011 13:27:34 +0800

> Signed-off-by: Cong Wang <amwang@redhat.com>

Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
  2011-11-27  8:07   ` Eric Dumazet
@ 2011-11-28 18:06     ` Alexander Duyck
  2011-11-28 18:26       ` Eric Dumazet
  0 siblings, 1 reply; 14+ messages in thread
From: Alexander Duyck @ 2011-11-28 18:06 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: Cong Wang, linux-kernel, akpm, Jeff Kirsher, Jesse Brandeburg,
	Bruce Allan, Carolyn Wyborny, Don Skidmore, Greg Rose,
	Peter P Waskiewicz Jr, John Ronciak, David S. Miller, Dean Nelson,
	Ian Campbell, Jiri Pirko, e1000-devel, netdev

On 11/27/2011 12:07 AM, Eric Dumazet wrote:
> Le dimanche 27 novembre 2011 à 13:27 +0800, Cong Wang a écrit :
>> Signed-off-by: Cong Wang <amwang@redhat.com>
>> ---
>> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
>> index cf480b5..b194beb 100644
>> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
>> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
>> @@ -3878,11 +3878,9 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
>>  				if (length <= copybreak &&
>>  				    skb_tailroom(skb) >= length) {
>>  					u8 *vaddr;
>> -					vaddr = kmap_atomic(buffer_info->page,
>> -					                    KM_SKB_DATA_SOFTIRQ);
>> +					vaddr = kmap_atomic(buffer_info->page);
>>  					memcpy(skb_tail_pointer(skb), vaddr, length);
>> -					kunmap_atomic(vaddr,
>> -					              KM_SKB_DATA_SOFTIRQ);
>> +					kunmap_atomic(vaddr);
>>  					/* re-use the page, so don't erase
>>  					 * buffer_info->page */
>>  					skb_put(skb, length);
>> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
>> index a855db1..8603c87 100644
>> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
>> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
>> @@ -1272,9 +1272,9 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
>>  			 */
>>  			dma_sync_single_for_cpu(&pdev->dev, ps_page->dma,
>>  						PAGE_SIZE, DMA_FROM_DEVICE);
>> -			vaddr = kmap_atomic(ps_page->page, KM_SKB_DATA_SOFTIRQ);
>> +			vaddr = kmap_atomic(ps_page->page);
>>  			memcpy(skb_tail_pointer(skb), vaddr, l1);
>> -			kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
>> +			kunmap_atomic(vaddr);
>>  			dma_sync_single_for_device(&pdev->dev, ps_page->dma,
>>  						   PAGE_SIZE, DMA_FROM_DEVICE);
>>  
>> @@ -1465,12 +1465,10 @@ static bool e1000_clean_jumbo_rx_irq(struct e1000_adapter *adapter,
>>  				if (length <= copybreak &&
>>  				    skb_tailroom(skb) >= length) {
>>  					u8 *vaddr;
>> -					vaddr = kmap_atomic(buffer_info->page,
>> -					                   KM_SKB_DATA_SOFTIRQ);
>> +					vaddr = kmap_atomic(buffer_info->page);
>>  					memcpy(skb_tail_pointer(skb), vaddr,
>>  					       length);
>> -					kunmap_atomic(vaddr,
>> -					              KM_SKB_DATA_SOFTIRQ);
>> +					kunmap_atomic(vaddr);
>>  					/* re-use the page, so don't erase
>>  					 * buffer_info->page */
>>  					skb_put(skb, length);
> But why are these drivers using kmap_atomic() in first place, since
> their fragments are allocated in regular zone (GFP_ATOMIC or
> GFP_KERNEL) ?

I was asking the same thing myself recently when I started working on
some copy-break like code for the ixgbe driver.  I believe the main
reason is a lack of documentation.  This code is based loosely on the
skb_copy_bits code which will use kmap_skb_frag over all of the paged
portions of the sk_buff.  As such it was decided to map things via
kmap_atomic in order to guarantee the pages had a valid virtual address.

If I understand things correctly, what you are brining up is that pages
allocated with either GFP_ATOMIC or GFP_KERNEL will always be allocated
from the lowmem pool and as such page_address should always succeed.  Is
that correct?

Thanks,

Alex

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 21/62] net: remove the second argument of k[un]map_atomic()
  2011-11-28 18:06     ` Alexander Duyck
@ 2011-11-28 18:26       ` Eric Dumazet
  0 siblings, 0 replies; 14+ messages in thread
From: Eric Dumazet @ 2011-11-28 18:26 UTC (permalink / raw)
  To: Alexander Duyck
  Cc: Jiri Pirko, Don, Cong Wang, David S. Miller, e1000-devel,
	Dean Nelson, Bruce Allan, Jesse Brandeburg, linux-kernel,
	John Ronciak, netdev, akpm, Ian Campbell

Le lundi 28 novembre 2011 à 10:06 -0800, Alexander Duyck a écrit :
> On 11/27/2011 12:07 AM, Eric Dumazet wrote:
> > But why are these drivers using kmap_atomic() in first place, since
> > their fragments are allocated in regular zone (GFP_ATOMIC or
> > GFP_KERNEL) ?
> 
> I was asking the same thing myself recently when I started working on
> some copy-break like code for the ixgbe driver.  I believe the main
> reason is a lack of documentation.  This code is based loosely on the
> skb_copy_bits code which will use kmap_skb_frag over all of the paged
> portions of the sk_buff.  As such it was decided to map things via
> kmap_atomic in order to guarantee the pages had a valid virtual address.
> 
> If I understand things correctly, what you are brining up is that pages
> allocated with either GFP_ATOMIC or GFP_KERNEL will always be allocated
> from the lowmem pool and as such page_address should always succeed.  Is
> that correct?
> 

Yes.

Either you could :

A) allocate high memory pages to lower pressure on LOWMEM area on 32bit
kernels.

B) avoid using kmap_atomic() & kunmap_atomic() and be faster on 32bit
kernels.

	skb_put(skb, length);
	memcpy(skb->data, page_address(buffer_info->page), length);

 




------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-11-28 18:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1322371662-26166-1-git-send-email-amwang@redhat.com>
2011-11-27  5:27 ` [PATCH 21/62] net: remove the second argument of k[un]map_atomic() Cong Wang
2011-11-27  6:12   ` David Miller
2011-11-27  8:07   ` Eric Dumazet
2011-11-28 18:06     ` Alexander Duyck
2011-11-28 18:26       ` Eric Dumazet
2011-11-28  7:39   ` Cong Wang
2011-11-28  7:48   ` [UPDATED PATCH " Cong Wang
2011-11-27  5:27 ` [PATCH 28/62] vhost: " Cong Wang
2011-11-27  5:27 ` [PATCH 53/62] net: " Cong Wang
2011-11-27  6:12   ` David Miller
2011-11-27  5:27 ` [PATCH 54/62] rds: " Cong Wang
2011-11-27  6:13   ` David Miller
2011-11-27  5:27 ` [PATCH 55/62] sunrpc: " Cong Wang
2011-11-28 15:28 [PATCH 54/62] rds: " Venkat Venkatsubra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).