On Tue, Sep 10, 2013 at 04:15:20PM +1000, Dave Chinner wrote:
On Tue, Sep 10, 2013 at 01:47:59PM +0900, Joonsoo Kim wrote:
On Tue, Sep 10, 2013 at 02:02:54PM +1000, Dave Chinner wrote:
Hi folks,
I just updated my performance test VM to the current 3.12-git
tree after the XFS dev
On Tue, Sep 10, 2013 at 10:31:41AM +0100, Mel Gorman wrote:
@@ -5045,15 +5038,50 @@ static int need_active_balance(struct lb_env *env)
static int active_load_balance_cpu_stop(void *data);
+static int should_we_balance(struct lb_env *env)
+{
+ struct sched_group *sg = env-sd-groups;
On Tue, Sep 10, 2013 at 09:25:05PM +, Christoph Lameter wrote:
On Tue, 10 Sep 2013, Joonsoo Kim wrote:
On Mon, Sep 09, 2013 at 02:44:03PM +, Christoph Lameter wrote:
On Mon, 9 Sep 2013, Joonsoo Kim wrote:
32 byte is not minimum object size, minimum *kmalloc* object size
On Wed, Sep 11, 2013 at 02:30:03PM +, Christoph Lameter wrote:
On Thu, 22 Aug 2013, Joonsoo Kim wrote:
And, therefore we should check pfmemalloc in page flag of first page,
but current implementation don't do that. virt_to_head_page(obj) just
return 'struct page' of that object
On Wed, Sep 11, 2013 at 02:22:25PM +, Christoph Lameter wrote:
On Wed, 11 Sep 2013, Joonsoo Kim wrote:
Anyway, could you review my previous patchset, that is, 'overload struct
slab
over struct page to reduce memory usage'? I'm not sure whether your answer
is
ack or not.
I
On Wed, Sep 11, 2013 at 02:39:22PM +, Christoph Lameter wrote:
On Thu, 22 Aug 2013, Joonsoo Kim wrote:
With build-time size checking, we can overload the RCU head over the LRU
of struct page to free pages of a slab in rcu context. This really help to
implement to overload the struct
On Mon, Jul 29, 2013 at 03:24:46PM +0800, Hillf Danton wrote:
On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim iamjoonsoo@lge.com wrote:
alloc_huge_page_node() use dequeue_huge_page_node() without
any validation check, so it can steal reserved page unconditionally.
Well, why is it illegal
On Tue, Jul 30, 2013 at 10:57:37PM +0530, Aneesh Kumar K.V wrote:
Joonsoo Kim iamjoonsoo@lge.com writes:
Currently, to track a reserved and allocated region, we use two different
ways for MAP_SHARED and MAP_PRIVATE. For MAP_SHARED, we use
address_mapping's private_list
On Mon, Jul 29, 2013 at 04:58:57PM +0800, Hillf Danton wrote:
On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim iamjoonsoo@lge.com wrote:
There is a race condition if we map a same file on different processes.
Region tracking is protected by mmap_sem and hugetlb_instantiation_mutex.
When we
On Mon, Jul 29, 2013 at 11:53:05AM -0700, Davidlohr Bueso wrote:
On Mon, 2013-07-29 at 14:31 +0900, Joonsoo Kim wrote:
There is a race condition if we map a same file on different processes.
Region tracking is protected by mmap_sem and hugetlb_instantiation_mutex.
When we do mmap, we don't
On Wed, Jul 31, 2013 at 10:49:24AM +0800, Hillf Danton wrote:
On Wed, Jul 31, 2013 at 10:27 AM, Joonsoo Kim iamjoonsoo@lge.com wrote:
On Mon, Jul 29, 2013 at 03:24:46PM +0800, Hillf Danton wrote:
On Mon, Jul 29, 2013 at 1:31 PM, Joonsoo Kim iamjoonsoo@lge.com
wrote
Hello, Naoya.
On Mon, Jul 29, 2013 at 01:52:52PM -0400, Naoya Horiguchi wrote:
Hi,
On Mon, Jul 29, 2013 at 02:31:57PM +0900, Joonsoo Kim wrote:
vma_need_reservation() can be substituted by vma_has_reserves()
with minor change. These function do almost same thing,
so unifying them
On Tue, Jul 30, 2013 at 11:19:58PM +0530, Aneesh Kumar K.V wrote:
Joonsoo Kim iamjoonsoo@lge.com writes:
vma_need_reservation() can be substituted by vma_has_reserves()
with minor change. These function do almost same thing,
so unifying them is better to maintain.
I found
On Mon, Jul 29, 2013 at 02:05:51PM -0400, Naoya Horiguchi wrote:
On Mon, Jul 29, 2013 at 02:31:59PM +0900, Joonsoo Kim wrote:
When we try to get a huge page with avoid_reserve, we don't consume
a reserved page. So it is treated like as non-reserve case.
This patch will be completely
On Mon, Jul 29, 2013 at 02:27:54PM -0400, Naoya Horiguchi wrote:
On Mon, Jul 29, 2013 at 02:32:01PM +0900, Joonsoo Kim wrote:
To implement a graceful failure handling, we need to know whether
allocation request is for reserved pool or not, on higher level.
In this patch, we just move up
On Mon, Jul 29, 2013 at 02:39:30PM -0400, Naoya Horiguchi wrote:
On Mon, Jul 29, 2013 at 02:32:02PM +0900, Joonsoo Kim wrote:
Just move down outsider_reserve check.
This makes code more readable.
There is no functional change.
Why don't you do this in 10/18?
Just help to review
On Mon, Jul 29, 2013 at 03:19:15PM -0400, Naoya Horiguchi wrote:
On Mon, Jul 29, 2013 at 03:05:37PM -0400, Naoya Horiguchi wrote:
On Mon, Jul 29, 2013 at 02:32:06PM +0900, Joonsoo Kim wrote:
If we fail with a allocated hugepage, it is hard to recover properly.
One such example is reserve
On Mon, Jul 29, 2013 at 04:19:10PM -0400, Naoya Horiguchi wrote:
On Mon, Jul 29, 2013 at 02:32:07PM +0900, Joonsoo Kim wrote:
If we fail with a reserved page, just calling put_page() is not sufficient,
because put_page() invoke free_huge_page() at last step and it doesn't
know whether
Hello, David.
On Mon, Jul 29, 2013 at 05:28:23PM +1000, David Gibson wrote:
On Mon, Jul 29, 2013 at 02:32:08PM +0900, Joonsoo Kim wrote:
If parallel fault occur, we can fail to allocate a hugepage,
because many threads dequeue a hugepage to handle a fault of same address.
This makes
On Tue, Jul 30, 2013 at 08:37:08AM +1000, David Gibson wrote:
On Mon, Jul 29, 2013 at 02:28:18PM +0900, Joonsoo Kim wrote:
Currently, we use a page with mapped count 1 in page cache for cow
optimization. If we find this condition, we don't allocate a new
page and copy contents. Instead, we
On Wed, Jul 31, 2013 at 02:21:38PM +0800, Hillf Danton wrote:
On Wed, Jul 31, 2013 at 12:41 PM, Joonsoo Kim iamjoonsoo@lge.com wrote:
On Wed, Jul 31, 2013 at 10:49:24AM +0800, Hillf Danton wrote:
On Wed, Jul 31, 2013 at 10:27 AM, Joonsoo Kim iamjoonsoo@lge.com
wrote:
On Mon, Jul
On Wed, Jul 31, 2013 at 11:25:04PM +0800, Hillf Danton wrote:
On Wed, Jul 31, 2013 at 2:37 PM, Joonsoo Kim iamjoonsoo@lge.com wrote:
On Wed, Jul 31, 2013 at 02:21:38PM +0800, Hillf Danton wrote:
On Wed, Jul 31, 2013 at 12:41 PM, Joonsoo Kim iamjoonsoo@lge.com
wrote:
On Wed, Jul
354958aa7 kernel/sched/fair.o
In addition, rename @balance to @should_balance in order to represent
its purpose more clearly.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index eaae77e..7f51b8c 100644
--- a/kernel/sched/fair.c
+++ b
-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7f51b8c..f72ee7d 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4195,36 +4195,6 @@ static unsigned long task_h_load(struct task_struct *p)
/** Helpers for find_busiest_group
Remove one division operation in find_buiest_queue().
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c61a614..eaae77e 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4931,7 +4931,7 @@ static struct rq
be compiled properly.
* Change from v1
Remove 2 patches, because I cannot sure they are right.
Joonsoo Kim (3):
sched: remove one division operation in find_buiest_queue()
sched: factor out code to should_we_balance()
sched: clean-up struct sd_lb_stat
kernel/sched/fair.c | 326
vbq in vmap_block isn't used. So remove it.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 13a5495..d23c432 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -752,7 +752,6 @@ struct vmap_block_queue {
struct vmap_block {
spinlock_t lock
Our intention in here is to find last_bit within the region to flush.
There is well-defined function, find_last_bit() for this purpose and
it's performance may be slightly better than current implementation.
So change it.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm
Size is usually below than KMALLOC_MAX_SIZE.
If we add a 'unlikely' macro, compiler can make better code.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 538bade..f0410eb 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -373,7
PageSwapCache() is always false when !CONFIG_SWAP, so compiler
properly discard related code. Therefore, we don't need #ifdef explicitly.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/swap.h b/include/linux/swap.h
index d95cde5..c638a71 100644
--- a/include/linux
pgtable related functions are mostly in pgtable-generic.c.
So move remaining functions from memory.c to pgtable-generic.c.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/memory.c b/mm/memory.c
index 1ce2e2a..26bce51 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -374,30 +374,6
We rarely allocate a page with ALLOC_NO_WATERMARKS and it is used
in slow path. For making fast path more faster, add likely macro to
help compiler optimization.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b100255..86ad44b 100644
We don't need a new page and then go out immediately if some condition
is met. Allocation has overhead in comparison with some condition check,
so allocating lazyily is preferable solution.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/migrate.c b/mm/migrate.c
index 6f0c244
On Fri, Aug 02, 2013 at 09:51:45AM +0200, Vincent Guittot wrote:
On 2 August 2013 03:50, Joonsoo Kim iamjoonsoo@lge.com wrote:
Now checking whether this cpu is appropriate to balance or not
is embedded into update_sg_lb_stats() and this checking has no direct
relationship
'struct page' of that object, not one of first page, since the SLAB
don't use __GFP_COMP when CONFIG_MMU. To get 'struct page' of first page,
we first get a slab and try to get it via virt_to_head_page(slab-s_mem).
Cc: Mel Gorman mgor...@suse.de
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
Now, bufctl is not proper name to this array.
So change it.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index fbb594f..af2db76 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2550,7 +2550,7 @@ static struct freelist *alloc_slabmgmt(struct kmem_cache
*cachep
mechanical ones and there is no functional change.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 8b85d8c..4e17190 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -42,18 +42,22 @@ struct page
We can get cachep using page in struct slab_rcu, so remove it.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 71ba8f5..7e1aabe 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -204,7 +204,6 @@ typedef unsigned int
This is trivial change, just use well-defined macro.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 84c4ed6..f9e676e 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2865,7 +2865,6 @@ static inline void
Now, virt_to_page(page-s_mem) is same as the page,
because slab use this structure for management.
So remove useless statement.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 0e7f2e7..fbb594f 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -750,9 +750,7
Now, free in struct slab is same meaning as inuse.
So, remove both and replace them with active.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index c271d5b..2ec2336 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -174,8 +174,7 @@ struct slab {
struct
It's useless now, so remove it.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 6ced1cc..c271d5b 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -163,8 +163,6 @@
*/
static bool pfmemalloc_active __read_mostly;
-#defineSLAB_LIMIT (((unsigned
-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index d9851ee..8b85d8c 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -130,6 +130,9 @@ struct page {
struct
If we use 'struct page' of first page as 'struct slab', there is no
advantage not to use __GFP_COMP. So use __GFP_COMP flag for all the cases.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index f9e676e..75c6082 100644
--- a/mm/slab.c
+++ b/mm/slab.c
array: 6 3 7 2 5 4 0 1
To get free objects, we access this array with following pattern.
0 - 1 - 2 - 3 - 4 - 5 - 6 - 7
This may help cache line footprint if slab has many objects, and,
in addition, this makes code much much simpler.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git
Now, we changed the management method of free objects of the slab and
there is no need to use special value, BUFCTL_END, BUFCTL_FREE and
BUFCTL_ACTIVE. So remove them.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 05fe37e..6ced1cc 100644
--- a/mm
We can get nodeid using address translation, so this field is not useful.
Therefore, remove it.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 34eb115..71ba8f5 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -222,7 +222,6 @@ struct slab
, roughly 5%.
And elapsed times are also improved by 3.1% to baseline.
I think that this patchsets deserve to be merged, since it reduces memory usage
and
also improves performance. :)
Please let me know expert's opinion.
Thanks.
This patchset is based on v3.12-rc5.
Joonsoo Kim (15):
slab
b1f9 mm/slab.o
* After
textdata bss dec hex filename
22074 23434 4 45512b1c8 mm/slab.o
And this help following patch to remove struct slab's colouroff.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm
Now there is no user colouroff, so remove it.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 7d79bd7..34eb115 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -219,7 +219,6 @@ struct slab {
union
On Wed, Oct 16, 2013 at 03:27:54PM +, Christoph Lameter wrote:
On Wed, 16 Oct 2013, Joonsoo Kim wrote:
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -930,7 +930,8 @@ static void *__ac_put_obj(struct kmem_cache *cachep,
struct array_cache *ac,
{
if (unlikely(pfmemalloc_active
On Wed, Oct 16, 2013 at 01:34:57PM -0700, Andrew Morton wrote:
On Wed, 16 Oct 2013 17:43:57 +0900 Joonsoo Kim iamjoonsoo@lge.com wrote:
There is two main topics in this patchset. One is to reduce memory usage
and the other is to change a management method of free objects of a slab
This logic is not simple to understand so that making separate function
helping readability. Additionally, we can use this change in the
following patch which implement for freelist to have another sized index
in according to nr objects.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff
bytes
so that 97 bytes, that is, more than 75% of object size, are wasted.
In a 64 byte sized slab case, no space is wasted if we use on-slab.
So set off-slab determining constraint to 128 bytes.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff
( +- 0.21% )
cache-misses are reduced by this patchset, roughly 5%.
And elapsed times are improved by 1%.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 3cee122..2f379ba 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -627,8 +627,8
Patches are on top of my previous posting named as
slab: overload struct slab over struct page to reduce memory usage
https://lkml.org/lkml/2013/10/16/155
Thanks.
Joonsoo Kim (5):
slab: factor out calculate nr objects in cache_estimate
slab: introduce helper functions to get/set free object
that the number of objects in a slab is less or
equal to 256 for a slab with 1 page.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index ec197b9..3cee122 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -157,6 +157,10 @@
#define ARCH_KMALLOC_FLAGS
In the following patches, to get/set free objects from the freelist
is changed so that simple casting doesn't work for it. Therefore,
introduce helper functions.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index
2013/10/18 Christoph Lameter c...@linux.com:
On Wed, 16 Oct 2013, Joonsoo Kim wrote:
- * see PAGE_MAPPING_ANON below.
- */
+ union {
+ struct address_space *mapping; /* If low bit clear, points
2013/10/18 Christoph Lameter c...@linux.com:
n Thu, 17 Oct 2013, Joonsoo Kim wrote:
To prepare to implement byte sized index for managing the freelist
of a slab, we should restrict the number of objects in a slab to be less
or equal to 256, since byte only represent 256 different values
2013/10/18 Christoph Lameter c...@linux.com:
On Wed, 16 Oct 2013, Joonsoo Kim wrote:
If we use 'struct page' of first page as 'struct slab', there is no
advantage not to use __GFP_COMP. So use __GFP_COMP flag for all the cases.
Yes this is going to make the allocators behave in the same way
rmap_walk() in page_mkclean().
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/rmap.c b/mm/rmap.c
index 5e78d5c..bbbc705 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -809,12 +809,13 @@ int page_referenced(struct page *page,
}
static int page_mkclean_one(struct page *page, struct
are
separate, because it clarify changes.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index 45c9b6a..0eef8cb 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
@@ -76,8 +76,7 @@ struct page *ksm_might_need_to_copy(struct page *page
().
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 58624b4..d641f6d 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -190,7 +190,7 @@ int page_referenced_one(struct page *, struct
vm_area_struct *,
int try_to_unmap(struct
, try_to_unmap_file
2. mechanical change to use rmap_walk() in try_to_munlock().
3. copy and paste comments.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index 0eef8cb..91b9719 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
for unmapping huge page).
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/rmap.c b/mm/rmap.c
index 55c8b8d..1214703 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1714,6 +1714,10 @@ static int rmap_walk_file(struct page *page, int
(*rmap_one)(struct page *,
if (!mapping
100642750 mm/rmap.o
13823 7058288 228165920 mm/ksm.o
13199 7058288 2219256b0 mm/ksm.o
Thanks.
Joonsoo Kim (9):
mm/rmap: recompute pgoff for huge page
mm/rmap: factor nonlinear handling out of try_to_unmap_file()
mm/rmap: factor lock function out
, in this patch, I introduce 4 function pointers to
handle above differences.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 0f65686..58624b4 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -239,6 +239,12 @@ struct
-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index 91b9719..3be6bb1 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
@@ -73,8 +73,6 @@ static inline void set_page_stable_node(struct page *page,
struct page *ksm_might_need_to_copy(struct page
of it. Therfore it is better
to factor nonlinear handling out of try_to_unmap_file() in order to
merge all kinds of rmap traverse functions easily.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/rmap.c b/mm/rmap.c
index 1214703..e6d532c 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
lock function for anon_lock out
of rmap_walk_anon(). It will be used in case of removing migration entry
and in default of rmap_walk_anon().
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/rmap.c b/mm/rmap.c
index e6d532c..916f2ed 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1683,6
bytes
so that 97 bytes, that is, more than 75% of object size, are wasted.
In a 64 byte sized slab case, no space is wasted if we use on-slab.
So set off-slab determining constraint to 128 bytes.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff
-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index eb043bf..e749f75 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -565,9 +565,31 @@ static inline struct array_cache *cpu_cache_get(struct
kmem_cache *cachep)
return cachep-array[smp_processor_id()];
}
-static size_t
by this patchset, roughly 5%.
And elapsed times are improved by 1%.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index 7c3c132..7fab788 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -634,8 +634,8 @@ static void cache_estimate(unsigned long gfporder, size_t
buffer_size
Patches are on top of v3.13-rc1.
Thanks.
Joonsoo Kim (5):
slab: factor out calculate nr objects in cache_estimate
slab: introduce helper functions to get/set free object
slab: restrict the number of objects in a slab
slab: introduce byte sized index for the freelist of a slab
slab: make
and give up this optimization.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/slab.h b/include/linux/slab.h
index c2bba24..23e1fa1 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -201,6 +201,17 @@ struct kmem_cache {
#ifndef KMALLOC_SHIFT_LOW
#define
In the following patches, to get/set free objects from the freelist
is changed so that simple casting doesn't work for it. Therefore,
introduce helper functions.
Acked-by: Christoph Lameter c...@linux.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/slab.c b/mm/slab.c
index
On Mon, Dec 02, 2013 at 02:44:34PM -0800, Andrew Morton wrote:
On Thu, 28 Nov 2013 16:48:38 +0900 Joonsoo Kim iamjoonsoo@lge.com wrote:
We have to recompute pgoff if the given page is huge, since result based
on HPAGE_SIZE is not approapriate for scanning the vma interval tree
On Mon, Dec 02, 2013 at 02:51:05PM -0800, Andrew Morton wrote:
On Mon, 02 Dec 2013 15:09:33 -0500 Naoya Horiguchi
n-horigu...@ah.jp.nec.com wrote:
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -235,11 +235,16 @@ struct anon_vma *page_lock_anon_vma_read(struct
page
On Mon, Dec 02, 2013 at 03:09:42PM -0500, Naoya Horiguchi wrote:
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 0f65686..58624b4 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -239,6 +239,12 @@ struct rmap_walk_control {
int (*main)(struct page *,
On Mon, Dec 02, 2013 at 03:01:07PM -0800, Andrew Morton wrote:
On Thu, 28 Nov 2013 16:48:43 +0900 Joonsoo Kim iamjoonsoo@lge.com wrote:
Now, we have an infrastructure in rmap_walk() to handle difference
from variants of rmap traversing functions.
So, just use it in try_to_unmap
On Mon, Dec 02, 2013 at 02:58:41PM +, Christoph Lameter wrote:
On Mon, 2 Dec 2013, Joonsoo Kim wrote:
Now, the size of the freelist for the slab management diminish,
so that the on-slab management structure can waste large space
if the object of the slab is large.
Hmmm
On Mon, Dec 02, 2013 at 05:49:42PM +0900, Joonsoo Kim wrote:
Currently, the freelist of a slab consist of unsigned int sized indexes.
Since most of slabs have less number of objects than 256, large sized
indexes is needless. For example, consider the minimum kmalloc slab. It's
object size
2013/12/3 Pekka Enberg penb...@iki.fi:
On 11/30/2013 01:42 PM, Meelis Roos wrote:
I am debugging a reboot problem on Sun Ultra 5 (sparc64) with 512M RAM
and turned on DEBUG_PAGEALLOC DEBUG_SLAB and DEBUG_SLAB_LEAK (and most
other debug options) and got the following BUG and hang on startup.
().
Reviewed-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 616aa4d..2462458 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -190,7 +190,7 @@ int page_referenced_one(struct page
data bss dec hex filename
10640 1 16 1065729a1 mm/rmap.o
10047 1 16 100642750 mm/rmap.o
13823 7058288 228165920 mm/ksm.o
13199 7058288 2219256b0 mm/ksm.o
Thanks.
Joonsoo Kim (9):
mm/rmap: recompute pgoff
rmap_walk() in page_mkclean().
Reviewed-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/rmap.c b/mm/rmap.c
index 7944d4b..d792e71 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -808,12 +808,13 @@ int page_referenced(struct page *page
, try_to_unmap_file
2. mechanical change to use rmap_walk() in try_to_munlock().
3. copy and paste comments.
Reviewed-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index 0eef8cb..91b9719 100644
-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index 91b9719..3be6bb1 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
@@ -73,8 +73,6 @@ static inline void set_page_stable_node(struct page
are
separate, because it clarify changes.
Reviewed-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index 45c9b6a..0eef8cb 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
@@ -76,8 +76,7
, in this patch, I introduce 4 function pointers to
handle above differences.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 6a456ce..616aa4d 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -235,10 +235,25 @@ struct
for unmapping huge page).
To handle both the cases, normal page for page cache and hugetlb page,
by same way, we can use compound_page(). It returns 0 on non-compound page
and it also returns proper value on compound page.
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/rmap.c b/mm
lock function for anon_lock out
of rmap_walk_anon(). It will be used in case of removing migration entry
and in default of rmap_walk_anon().
Reviewed-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/rmap.c b/mm/rmap.c
index a387c44
of it. Therfore it is better
to factor nonlinear handling out of try_to_unmap_file() in order to
merge all kinds of rmap traverse functions easily.
Reviewed-by: Naoya Horiguchi n-horigu...@ah.jp.nec.com
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/rmap.c b/mm/rmap.c
index 20c1a0d
really really want them to be
backed by order=0 pages.
Hello, Andrew.
Following patch would fix this problem.
Thanks.
---8
From 7f21232d1eeffccdbd0f6d79c04d297cf95a713e Mon Sep 17 00:00:00 2001
From: Joonsoo Kim iamjoonsoo@lge.com
Date: Wed, 4 Dec 2013 10
On Tue, Dec 03, 2013 at 06:07:17PM -0800, Andrew Morton wrote:
On Wed, 4 Dec 2013 10:52:18 +0900 Joonsoo Kim iamjoonsoo@lge.com wrote:
SLUB already try to allocate high order page with clearing __GFP_NOFAIL.
But, when allocating shadow page for kmemcheck, it missed clearing
the flag
2013/12/5 Christoph Lameter c...@linux.com:
On Tue, 3 Dec 2013, Andrew Morton wrote:
page = alloc_slab_page(alloc_gfp, node, oo);
if (unlikely(!page)) {
oo = s-min;
What is the value of s-min? Please tell me it's zero.
It usually is.
@@ -1349,7 +1350,7 @@ static
On Wed, Dec 04, 2013 at 04:33:43PM +, Christoph Lameter wrote:
On Thu, 5 Dec 2013, Joonsoo Kim wrote:
Now we have cpu partial slabs facility, so I think that slowpath isn't
really
slow. And it doesn't much increase the management overhead in the node
partial lists, because of cpu
queue_pages_range() isolates hugetlbfs pages and putback_lru_pages() can't
handle these. We should change it to putback_movable_pages().
Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index eca4a31..6d04d37 100644
--- a/mm/mempolicy.c
+++ b/mm
migrate_pages() should return number of pages not migrated or error code.
When unmap_and_move return -EAGAIN, outer loop is re-execution without
initialising nr_failed. This makes nr_failed over-counted.
So this patch correct it by initialising nr_failed in outer loop.
Signed-off-by: Joonsoo Kim
501 - 600 of 4538 matches
Mail list logo