Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1332202 > unrolled thread
| Started by | sunil.kovvuri@gmail.com |
|---|---|
| First post | 2016-02-11 17:20 +0100 |
| Last post | 2016-02-11 17:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 6/6] net: thunderx: Alloc higher order pages when pagesize is small sunil.kovvuri@gmail.com - 2016-02-11 17:20 +0100
| From | sunil.kovvuri@gmail.com |
|---|---|
| Date | 2016-02-11 17:20 +0100 |
| Subject | [PATCH v2 6/6] net: thunderx: Alloc higher order pages when pagesize is small |
| Message-ID | <r128h-2LZ-1@gated-at.bofh.it> |
From: Sunil Goutham <sgoutham@cavium.com>
Allocate higher order pages when pagesize is small, this will
reduce number of calls to page allocator and wastage of memory.
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
---
drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index 50ab6f4..5adb208 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -78,7 +78,7 @@ static void nicvf_free_q_desc_mem(struct nicvf *nic, struct q_desc_mem *dmem)
static inline int nicvf_alloc_rcv_buffer(struct nicvf *nic, gfp_t gfp,
u32 buf_len, u64 **rbuf)
{
- int order = get_order(buf_len);
+ int order = (PAGE_SIZE <= 4096) ? PAGE_ALLOC_COSTLY_ORDER : 0;
/* Check if request can be accomodated in previous allocated page */
if (nic->rb_page) {
--
1.7.1
Back to top | Article view | linux.kernel
csiph-web