From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: chanho.min@lge.com, Johannes Weiner <hannes@cmpxchg.org>,
iamjoonsoo.kim@lge.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>, Mel Gorman <mgorman@suse.de>
Subject: [PATCH 3/3] mm, vmalloc: Remove alloc_map from vmap_block
Date: Fri, 07 Jun 2013 17:55:10 +0800 [thread overview]
Message-ID: <51B1ADFE.2020201@cn.fujitsu.com> (raw)
In-Reply-To: <51B1AD2F.4030702@cn.fujitsu.com>
As we have removed the dead code in the vb_alloc, it seems there is
no place to use the alloc_map. So there is no reason to maintain
the alloc_map in vmap_block.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
mm/vmalloc.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 5c037b9..ad11d4f 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -754,7 +754,6 @@ struct vmap_block {
struct vmap_area *va;
struct vmap_block_queue *vbq;
unsigned long free, dirty;
- DECLARE_BITMAP(alloc_map, VMAP_BBMAP_BITS);
DECLARE_BITMAP(dirty_map, VMAP_BBMAP_BITS);
struct list_head free_list;
struct rcu_head rcu_head;
@@ -820,7 +819,6 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask)
vb->va = va;
vb->free = VMAP_BBMAP_BITS;
vb->dirty = 0;
- bitmap_zero(vb->alloc_map, VMAP_BBMAP_BITS);
bitmap_zero(vb->dirty_map, VMAP_BBMAP_BITS);
INIT_LIST_HEAD(&vb->free_list);
@@ -873,7 +871,6 @@ static void purge_fragmented_blocks(int cpu)
if (vb->free + vb->dirty == VMAP_BBMAP_BITS && vb->dirty != VMAP_BBMAP_BITS) {
vb->free = 0; /* prevent further allocs after releasing lock */
vb->dirty = VMAP_BBMAP_BITS; /* prevent purging it again */
- bitmap_fill(vb->alloc_map, VMAP_BBMAP_BITS);
bitmap_fill(vb->dirty_map, VMAP_BBMAP_BITS);
spin_lock(&vbq->lock);
list_del_rcu(&vb->free_list);
--
1.7.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: chanho.min@lge.com, Johannes Weiner <hannes@cmpxchg.org>,
iamjoonsoo.kim@lge.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>, Mel Gorman <mgorman@suse.de>
Subject: [PATCH 3/3] mm, vmalloc: Remove alloc_map from vmap_block
Date: Fri, 07 Jun 2013 17:55:10 +0800 [thread overview]
Message-ID: <51B1ADFE.2020201@cn.fujitsu.com> (raw)
In-Reply-To: <51B1AD2F.4030702@cn.fujitsu.com>
As we have removed the dead code in the vb_alloc, it seems there is
no place to use the alloc_map. So there is no reason to maintain
the alloc_map in vmap_block.
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
---
mm/vmalloc.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 5c037b9..ad11d4f 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -754,7 +754,6 @@ struct vmap_block {
struct vmap_area *va;
struct vmap_block_queue *vbq;
unsigned long free, dirty;
- DECLARE_BITMAP(alloc_map, VMAP_BBMAP_BITS);
DECLARE_BITMAP(dirty_map, VMAP_BBMAP_BITS);
struct list_head free_list;
struct rcu_head rcu_head;
@@ -820,7 +819,6 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask)
vb->va = va;
vb->free = VMAP_BBMAP_BITS;
vb->dirty = 0;
- bitmap_zero(vb->alloc_map, VMAP_BBMAP_BITS);
bitmap_zero(vb->dirty_map, VMAP_BBMAP_BITS);
INIT_LIST_HEAD(&vb->free_list);
@@ -873,7 +871,6 @@ static void purge_fragmented_blocks(int cpu)
if (vb->free + vb->dirty == VMAP_BBMAP_BITS && vb->dirty != VMAP_BBMAP_BITS) {
vb->free = 0; /* prevent further allocs after releasing lock */
vb->dirty = VMAP_BBMAP_BITS; /* prevent purging it again */
- bitmap_fill(vb->alloc_map, VMAP_BBMAP_BITS);
bitmap_fill(vb->dirty_map, VMAP_BBMAP_BITS);
spin_lock(&vbq->lock);
list_del_rcu(&vb->free_list);
--
1.7.1
next prev parent reply other threads:[~2013-06-07 9:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 9:51 [PATCH 0/3] mm, vmalloc: cleanup for vmap block Zhang Yanfei
2013-06-07 9:51 ` Zhang Yanfei
2013-06-07 9:53 ` [PATCH 1/3] mm, vmalloc: Remove dead code in vb_alloc Zhang Yanfei
2013-06-07 9:53 ` Zhang Yanfei
2013-06-07 9:54 ` [PATCH 2/3] mm, vmalloc: Remove unused purge_fragmented_blocks_thiscpu Zhang Yanfei
2013-06-07 9:54 ` Zhang Yanfei
2013-06-07 9:55 ` Zhang Yanfei [this message]
2013-06-07 9:55 ` [PATCH 3/3] mm, vmalloc: Remove alloc_map from vmap_block Zhang Yanfei
2013-06-10 1:12 ` [PATCH 0/3] mm, vmalloc: cleanup for vmap block Chanho Min
2013-06-10 1:12 ` Chanho Min
2013-06-20 6:38 ` Johannes Weiner
2013-06-20 6:38 ` Johannes Weiner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B1ADFE.2020201@cn.fujitsu.com \
--to=zhangyanfei@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=chanho.min@lge.com \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.