ksm: fix use after free with merge_across_nodes = 0
cover ksm: fix use after free with merge_across_nodes = 0
Hello,
The KSMscale patch in -mm (not yet upstream) is fundamental for enterprise use and in turn it's included in -mm, RHEL, CentoOS and Ubuntu and it'd be great if it could be merged upstream (especially after solving this problem with merge_across_nodes = 0 ...).
https://marc.info/?l=linux-mm&m=149265809928003&w=2
http://kernel.ubuntu.com/~gavinguo/sf00131845/numa-131845.svg
http://kernel.ubuntu.com/~gavinguo/sf00131845/virtual_appliances_loading.png
A few weeks ago I got a report that with merge_across_nodes set to 0 KSM would eventually crash with an user after free (I assumed it was an use after free because the kindly provided crashdump showed a corrupted stable_node). Everything was again rock solid after setting merge_across_nodes back to 1.
merge_across_nodes set to 0 is a tuning performance optimization for NUMA that creates a different copy of KSM pages for each NUMA node with a KSM stable_tree for each node (instead of sharing the same equal memory across the whole system with a single stable_tree).
I couldn't reproduce this bug so far but there's a definitive use after free in the merge_across_nodes = 0 path, so it would help if who can reproduce already can give this a spin (untested... or better tested but only in a NUMA balancing environment that never reproduced the use after free in the first place so it's inconclusive).
In production I recommend to leave the merge_across_nodes default value set to 1 if running with the KSMscale patch applied for the time being, until this is confirmed fixed.
Again this fix should be considered untested so it should be run in testing environment only.
Thanks,
Andrea
Andrea Arcangeli (1):
ksm: fix use after free with merge_across_nodes = 0
mm/ksm.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 11 deletions(-)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/1 ksm: fix use after free with merge_across_nodes = 0
If merge_across_nodes was manually set to 0 (not the default value) by the admin or a tuned profile on NUMA systems triggering cross-NODE page migrations, a stable_node use after free could materialize.
If the chain is collapsed stable_node would point to the old chain that was already freed. stable_node_dup would be the stable_node dup now converted to a regular stable_node and indexed in the rbtree in replacement of the freed stable_node chain (not anymore a dup).
This special case where the chain is collapsed in the NUMA replacement path, is now detected by setting stable_node to NULL by the chain_prune callee if it decides to collapse the chain. This tells the NUMA replacement code that even if stable_node and stable_node_dup are different, this is not a chain if stable_node is NULL, as the stable_node_dup was converted to a regular stable_node and the chain was collapsed.
It is generally safer for the callee to force the caller stable_node to NULL the moment it become stale so any other mistake like this would result in an instant Oops easier to debug than an use after free.
Otherwise the replace logic would act like if stable_node was a valid chain, when in fact it was freed. Notably stable_node_chain_add_dup(page_node, stable_node) would run on a stable stable_node.
Andrey Ryabinin found the source of the use after free in chain_prune().
--- mm/ksm.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 11 deletions(-)
mm/ksm.c +55 -11
@@ -338,6 +338,7 @@ static inline void stable_node_chain_add_dup(struct stable_node *dup,static inline void __stable_node_dup_del (struct stable_node *dup) { +VM_BUG_ON (!is_stable_node_dup (dup));hlist_del (&dup->hlist_dup); ksm_stable_node_dups--; }
@@ -1315,12 +1316,12 @@ bool is_page_sharing_candidate(struct stable_node *stable_node)return __is_page_sharing_candidate (stable_node,0 ); } -static struct stable_node *stable_node_dup (struct stable_node *stable_node, +static struct stable_node *stable_node_dup (struct stable_node **_stable_node,struct page **tree_page,struct rb_root *root,bool prune_stale_stable_nodes) { -struct stable_node *dup, *found =NULL ; +struct stable_node *dup, *found =NULL , *stable_node = *_stable_node;struct hlist_node *hlist_safe;struct page *_tree_page;int nr =0 ;
@@ -1393,6 +1394,15 @@ static struct stable_node *stable_node_dup(struct stable_node *stable_node,free_stable_node (stable_node); ksm_stable_node_chains--; ksm_stable_node_dups--; +/* +* NOTE: the caller depends on the +* *_stable_node to become NULL if the chain +* was collapsed. Enforce that if anything +* uses a stale (freed) stable_node chain a +* visible crash will materialize (instead of +* an use after free). +*/ + *_stable_node = stable_node =NULL ; }else if (__is_page_sharing_candidate (found,1 )) {/* * Refile our candidate at the head
@@ -1422,11 +1432,12 @@ static struct stable_node *stable_node_dup_any(struct stable_node *stable_node, typeof(*stable_node), hlist_dup); } -static struct stable_node *__stable_node_chain (struct stable_node *stable_node, +static struct stable_node *__stable_node_chain (struct stable_node **_stable_node,struct page **tree_page,struct rb_root *root,bool prune_stale_stable_nodes) { +struct stable_node *stable_node = *_stable_node;if (!is_stable_node_chain (stable_node)) {if (is_page_sharing_candidate (stable_node)) { *tree_page =get_ksm_page (stable_node, false);
@@ -1434,11 +1445,11 @@ static struct stable_node *__stable_node_chain(struct stable_node *stable_node, }return NULL ; } -return stable_node_dup (stable_node, tree_page, root, +return stable_node_dup (_stable_node, tree_page, root, prune_stale_stable_nodes); } -static __always_inline struct stable_node *chain_prune(struct stable_node *s_n, +static __always_inline struct stable_node *chain_prune(struct stable_node **s_n,struct page **t_p,struct rb_root *root) {
@@ -1449,7 +1460,7 @@ static __always_inline struct stable_node *chain(struct stable_node *s_n,struct page **t_p, struct rb_root *root) { - return __stable_node_chain(s_n, t_p, root, false); + return __stable_node_chain(&s_n, t_p, root, false); }/*
@@ -1490,7 +1501,15 @@ static struct page *stable_tree_search(struct page *page)cond_resched (); stable_node = rb_entry(*new, struct stable_node, node); stable_node_any =NULL ; - stable_node_dup =chain_prune (stable_node, &tree_page, root); + stable_node_dup =chain_prune (&stable_node, &tree_page, root); +/* +* NOTE: stable_node may have been freed by +* chain_prune() if the returned stable_node_dup is +* not NULL. stable_node_dup may have been inserted in +* the rbtree instead as a regular stable_node (in +* order to collapse the stable_node chain if a single +* stable_node dup was found in it). +*/ if (!stable_node_dup) {/* * Either all stable_node dups were full in
@@ -1605,20 +1624,33 @@ static struct page *stable_tree_search(struct page *page)return NULL ; replace: -if (stable_node_dup == stable_node) { +/* +* If stable_node was a chain and chain_prune collapsed it, +* stable_node will be NULL here. In that case the +* stable_node_dup is the regular stable_node that has +* replaced the chain. If stable_node is not NULL and equal to +* stable_node_dup there was no chain and stable_node_dup is +* the regular stable_node in the stable rbtree. Otherwise +* stable_node is the chain and stable_node_dup is the dup to +* replace. +*/ +if (!stable_node || stable_node_dup == stable_node) { +VM_BUG_ON (is_stable_node_chain (stable_node_dup)); +VM_BUG_ON (is_stable_node_dup (stable_node_dup));/* there is no chain */ if (page_node) {VM_BUG_ON (page_node->head != &migrate_nodes);list_del (&page_node->list);DO_NUMA (page_node->nid = nid); -rb_replace_node (&stable_node->node, &page_node->node, +rb_replace_node (&stable_node_dup->node, + &page_node->node, root);if (is_page_sharing_candidate (page_node))get_page (page);else page =NULL ; }else { -rb_erase (&stable_node->node, root); +rb_erase (&stable_node_dup->node, root); page =NULL ; } }else {
@@ -1645,7 +1677,17 @@ static struct page *stable_tree_search(struct page *page)/* stable_node_dup could be null if it reached the limit */ if (!stable_node_dup) stable_node_dup = stable_node_any; -if (stable_node_dup == stable_node) { +/* +* If stable_node was a chain and chain_prune collapsed it, +* stable_node will be NULL here. In that case the +* stable_node_dup is the regular stable_node that has +* replaced the chain. If stable_node is not NULL and equal to +* stable_node_dup there was no chain and stable_node_dup is +* the regular stable_node in the stable rbtree. +*/ +if (!stable_node || stable_node_dup == stable_node) { +VM_BUG_ON (is_stable_node_chain (stable_node_dup)); +VM_BUG_ON (is_stable_node_dup (stable_node_dup));/* chain is missing so create it */ stable_node =alloc_stable_node_chain (stable_node_dup, root);
@@ -1658,6 +1700,8 @@ static struct page *stable_tree_search(struct page *page)* of the current nid for this page * content. */ +VM_BUG_ON (!is_stable_node_chain (stable_node)); +VM_BUG_ON (!is_stable_node_dup (stable_node_dup));VM_BUG_ON (page_node->head != &migrate_nodes);list_del (&page_node->list);DO_NUMA (page_node->nid = nid);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 26 lines · Andrea Arcangeli
If
merge_across_nodeswas manually set to 0 (not the default value) by the admin or a tuned profile on NUMA systems triggering cross-NODE page migrations, astable_nodeuse after free could materialize.If the chain is collapsed
stable_nodewould point to the old chain that was already freed.stable_node_dupwould be thestable_nodedup now converted to a regularstable_nodeand indexed in the rbtree in replacement of the freedstable_nodechain (not anymore a dup).This special case where the chain is collapsed in the NUMA replacement path, is now detected by setting
stable_nodeto NULL by thechain_prunecallee if it decides to collapse the chain. This tells the NUMA replacement code that even ifstable_nodeandstable_node_dupare different, this is not a chain ifstable_nodeis NULL, as thestable_node_dupwas converted to a regularstable_nodeand the chain was collapsed.It is generally safer for the callee to force the caller
stable_nodeto NULL the moment it become stale so any other mistake like this would result in an instant Oops easier to debug than an use after free.Otherwise the replace logic would act like if
stable_nodewas a valid chain, when in fact it was freed. Notablystable_node_chain_add_dup(page_node, stable_node)would run on a stablestable_node.
Quoted 7 lines
Andrey Ryabinin found the source of the use after free in
chain_prune().Reported-by Andrey Ryabinin <[email protected]>Reported-by Evgheni Dereveanchin <[email protected]>Signed-off-by Andrea Arcangeli <[email protected]>---
Works for me,
Bellow is reproducer which causes crash in ksm in several minutes without this fix.
$ cat ksm_test.c
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <numaif.h>
#include <sys/types.h>
#include <sys/wait.h>
#define NR_NODES 4
#define MAP_SIZE 4096
#define NR_THREADS 1024
pid_t pids[NR_THREADS];
int merge_and_migrate(void)
{
void *p;
unsigned long rnd;
unsigned long old_node, new_node;
pid_t p_pid, pid;
int j;
p = mmap(NULL, MAP_SIZE, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
if (p == MAP_FAILED)
perror("mmap"), exit(1);
memset(p, 0xff, MAP_SIZE);
if (madvise(p, MAP_SIZE, MADV_MERGEABLE))
perror("madvise"), exit(1);
while (1) {
sleep(0);
rnd = rand() % 2;
switch (rnd) {
case 0: {
rnd = rand() % 128;
memset(p, rnd, MAP_SIZE);
break;
}
case 1: {
j = rand()%NR_NODES;
old_node = 1 << j;
new_node = 1<<((j+1)%NR_NODES);
migrate_pages(0, NR_NODES, &old_node, &new_node);
break;
}
}
}
return 0;
}int main(void)
{
int i,ret,j;
pid_t pid;
int wstatus;
unsigned long old_node, new_node;
for (i = 0; i < NR_THREADS; i++) {
pid = fork();
if (pid < 0) {
perror("fork");
return 1;
}
if (pid) {
pids[i] = pid;
continue;
} else
merge_and_migrate();
}
while (1) {
pid = waitpid(-1, &wstatus, WNOHANG);
if (pid < 0) {
perror("waitpid failed");
return 1;
}
if (pid) {
for (i = 0; i< NR_THREADS; i++) {
if (pids[i] == pid) {
pid = fork();
if (pid < 0) {
perror("fork in while");
return 1;
}
if (pid) {
pids[i] = pid;
break;
} else
merge_and_migrate();
}
}
continue; /*while(1)*/
}
i = rand()%NR_THREADS;
kill(pids[i], SIGKILL);
}
return 0;
}$ cat run_ksm.sh #!/bin/bash
gcc -lnuma -O2 ksm_test.c -o ksm_test
echo 1 > /sys/kernel/mm/ksm/run
echo 0 > /sys/kernel/mm/ksm/merge_across_nodes
echo 2 > /sys/kernel/mm/ksm/max_page_sharing
echo 0 > /sys/kernel/mm/ksm/stable_node_chains_prune_millisecs ./ksm_test
$ ./run_ksm.sh [ 203.251200] ================================================================== [ 203.251679] BUG: KASAN: use-after-free in stable_tree_search+0x1450/0x16f0 [ 203.252229] Read of size 4 at addr ffff880037e9d938 by task ksmd/170 [ 203.252800] [ 203.252957] CPU: 2 PID: 170 Comm: ksmd Not tainted 4.12.0-rc1-next-20170515+ #639 [ 203.253627] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.2-0-g5f4c7b1-prebuilt.qemu-project.org 04/01/2014 [ 203.254670] Call Trace: [ 203.254907] dump_stack+0x67/0x98 [ 203.255222] print_address_description+0x7c/0x290 [ 203.255652] ? stable_tree_search+0x1450/0x16f0 [ 203.256073] kasan_report+0x26e/0x350 [ 203.256418] __asan_report_load4_noabort+0x19/0x20 [ 203.256852] stable_tree_search+0x1450/0x16f0 [ 203.257262] ? __stable_node_chain+0x8a0/0x8a0 [ 203.257668] ? follow_page_mask+0x5f9/0xd80 [ 203.258060] ksm_scan_thread+0xb47/0x2790 [ 203.258438] ? stable_tree_search+0x16f0/0x16f0 [ 203.258858] ? __schedule+0x904/0x1ad0 [ 203.259214] ? clkdev_alloc+0xd0/0xd0 [ 203.259553] ? wake_atomic_t_function+0x2a0/0x2a0 [ 203.259985] ? trace_hardirqs_on+0xd/0x10 [ 203.260361] kthread+0x2d6/0x3d0 [ 203.260658] ? stable_tree_search+0x16f0/0x16f0 [ 203.261073] ? kthread_create_on_node+0xb0/0xb0 [ 203.261485] ret_from_fork+0x2e/0x40 [ 203.261819] [ 203.261936] Allocated by task 170: [ 203.262251] save_stack_trace+0x1b/0x20 [ 203.262601] kasan_kmalloc+0xee/0x180 [ 203.262938] kasan_slab_alloc+0x12/0x20 [ 203.263290] kmem_cache_alloc+0x129/0x2d0 [ 203.263654] alloc_stable_node_chain+0x29/0x310 [ 203.264072] ksm_scan_thread+0x2048/0x2790 [ 203.264444] kthread+0x2d6/0x3d0 [ 203.264744] ret_from_fork+0x2e/0x40 [ 203.265075] [ 203.265220] Freed by task 170: [ 203.265503] save_stack_trace+0x1b/0x20 [ 203.265852] kasan_slab_free+0xad/0x180 [ 203.266208] kmem_cache_free+0xc7/0x300 [ 203.266558] __stable_node_chain+0x68a/0x8a0 [ 203.266948] stable_tree_search+0x18e/0x16f0 [ 203.267339] ksm_scan_thread+0xb47/0x2790 [ 203.267655] kthread+0x2d6/0x3d0 [ 203.267910] ret_from_fork+0x2e/0x40
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · On Fri, 12 May 2017 21:38:04 +0200 Andrea Arcangeli <[email protected]> wrote:
The KSMscale patch in -mm (not yet upstream) is fundamental for enterprise use and in turn it's included in -mm, RHEL, CentoOS and Ubuntu and it'd be great if it could be merged upstream (especially after solving this problem with
merge_across_nodes= 0 ...).
In April 2016 I folded two fixes against ksm-introduce-ksm_max_page_sharing-per-page-deduplication-limit.patch into that patch and disabled the patch from -mm. I think/assume because it was causing crashes. The patch then got forgotten about.
I have resurrected it (below) and merged this patch after it.
From: Andrea Arcangeli <[email protected]>
Subject: ksm: introduce ksm_max_page_sharing per page deduplication limit
Without a max deduplication limit for each KSM page, the list of the rmap_items associated to each stable_node can grow infinitely large.
During the rmap walk each entry can take up to ~10usec to process because of IPIs for the TLB flushing (both for the primary MMU and the secondary MMUs with the MMU notifier). With only 16GB of address space shared in the same KSM page, that would amount to dozens of seconds of kernel runtime.
A ~256 max deduplication factor will reduce the latencies of the rmap walks on KSM pages to order of a few msec. Just doing the cond_resched() during the rmap walks is not enough, the list size must have a limit too, otherwise the caller could get blocked in (schedule friendly) kernel computations for seconds, unexpectedly.
There's room for optimization to significantly reduce the IPI delivery cost during the page_referenced(), but at least for page_migration in the KSM case (used by hard NUMA bindings, compaction and NUMA balancing) it may be inevitable to send lots of IPIs if each rmap_item->mm is active on a different CPU and there are lots of CPUs. Even if we ignore the IPI delivery cost, we've still to walk the whole KSM rmap list, so we can't allow millions or billions (ulimited) number of entries in the KSM stable_node rmap_item lists.
The limit is enforced efficiently by adding a second dimension to the stable rbtree. So there are three types of stable_nodes: the regular ones (identical as before, living in the first flat dimension of the stable rbtree), the "chains" and the "dups".
Every "chain" and all "dups" linked into a "chain" enforce the invariant that they represent the same write protected memory content, even if each "dup" will be pointed by a different KSM page copy of that content. This way the stable rbtree lookup computational complexity is unaffected if compared to an unlimited max_sharing_limit. It is still enforced that there cannot be KSM page content duplicates in the stable rbtree itself.
Adding the second dimension to the stable rbtree only after the max_page_sharing limit hits, provides for a zero memory footprint increase on 64bit archs. The memory overhead of the per-KSM page stable_tree and per virtual mapping rmap_item is unchanged. Only after the max_page_sharing limit hits, we need to allocate a stable_tree "chain" and rb_replace() the "regular" stable_node with the newly allocated stable_node "chain". After that we simply add the "regular" stable_node to the chain as a stable_node "dup" by linking hlist_dup in the stable_node_chain->hlist. This way the "regular" (flat) stable_node is converted to a stable_node "dup" living in the second dimension of the stable rbtree.
During stable rbtree lookups the stable_node "chain" is identified as stable_node->rmap_hlist_len == STABLE_NODE_CHAIN (aka is_stable_node_chain()).
When dropping stable_nodes, the stable_node "dup" is identified as stable_node->head == STABLE_NODE_DUP_HEAD (aka is_stable_node_dup()).
The STABLE_NODE_DUP_HEAD must be an unique valid pointer never used elsewhere in any stable_node->head/node to avoid a clashes with the stable_node->node.rb_parent_color pointer, and different from &migrate_nodes. So the second field of &migrate_nodes is picked and verified as always safe with a BUILD_BUG_ON in case the list_head implementation changes in the future.
The STABLE_NODE_DUP is picked as a random negative value in stable_node->rmap_hlist_len. rmap_hlist_len cannot become negative when it's a "regular" stable_node or a stable_node "dup".
The stable_node_chain->nid is irrelevant. The stable_node_chain->kpfn is aliased in a union with a time field used to rate limit the stable_node_chain->hlist prunes.
The garbage collection of the stable_node_chain happens lazily during stable rbtree lookups (as for all other kind of stable_nodes), or while disabling KSM with "echo 2 >/sys/kernel/mm/ksm/run" while collecting the entire stable rbtree.
While the "regular" stable_nodes and the stable_node "dups" must wait for their underlying tree_page to be freed before they can be freed themselves, the stable_node "chains" can be freed immediately if the stable_node->hlist turns empty. This is because the "chains" are never pointed by any page->mapping and they're effectively stable rbtree KSM self contained metadata.
---
Documentation/vm/ksm.txt | 63 +++ mm/ksm.c | 733 +++++++++++++++++++++++++++++++++---- 2 files changed, 730 insertions(+), 66 deletions(-)
Documentation/vm/ksm.txt renamed from Documentation/vm/ksm.txt~ksm-introduce-ksm_max_page_sharing-per-page-deduplication-limit +63 -0
@@ -98,6 +98,50 @@ use_zero_pages - specifies whether emp it is only effective for pages merged after the change. Default: 0 (normal KSM behaviour as in earlier releases) +max_page_sharing - Maximum sharing allowed for each KSM page. This + enforces a deduplication limit to avoid the virtual + memory rmap lists to grow too large. The minimum + value is 2 as a newly created KSM page will have at + least two sharers. The rmap walk has O(N) + complexity where N is the number of rmap_items + (i.e. virtual mappings) that are sharing the page, + which is in turn capped by max_page_sharing. So + this effectively spread the the linear O(N) + computational complexity from rmap walk context + over different KSM pages. The ksmd walk over the + stable_node "chains" is also O(N), but N is the + number of stable_node "dups", not the number of + rmap_items, so it has not a significant impact on + ksmd performance. In practice the best stable_node + "dup" candidate will be kept and found at the head + of the "dups" list. The higher this value the + faster KSM will merge the memory (because there + will be fewer stable_node dups queued into the + stable_node chain->hlist to check for pruning) and + the higher the deduplication factor will be, but + the slowest the worst case rmap walk could be for + any given KSM page. Slowing down the rmap_walk + means there will be higher latency for certain + virtual memory operations happening during + swapping, compaction, NUMA balancing and page + migration, in turn decreasing responsiveness for + the caller of those virtual memory operations. The + scheduler latency of other tasks not involved with + the VM operations doing the rmap walk is not + affected by this parameter as the rmap walks are + always schedule friendly themselves. + +stable_node_chains_prune_millisecs - How frequently to walk the whole + list of stable_node "dups" linked in the + stable_node "chains" in order to prune stale + stable_nodes. Smaller milllisecs values will free + up the KSM metadata with lower latency, but they + will make ksmd use more CPU during the scan. This + only applies to the stable_node chains so it's a + noop if not a single KSM page hit the + max_page_sharing yet (there would be no stable_node + chains in such case). + The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/: pages_shared - how many shared pages are being used
@@ -106,10 +150,29 @@ pages_unshared - how many pages unique pages_volatile - how many pages changing too fast to be placed in a tree full_scans - how many times all mergeable areas have been scanned +stable_node_chains - number of stable node chains allocated, this is + effectively the number of KSM pages that hit the + max_page_sharing limit +stable_node_dups - number of stable node dups queued into the + stable_node chains + A high ratio of pages_sharing to pages_shared indicates good sharing, but a high ratio of pages_unshared to pages_sharing indicates wasted effort. pages_volatile embraces several different kinds of activity, but a high proportion there would also indicate poor use of madvise MADV_MERGEABLE. +The maximum possible page_sharing/page_shared ratio is limited by the +max_page_sharing tunable. To increase the ratio max_page_sharing must +be increased accordingly. + +The stable_node_dups/stable_node_chains ratio is also affected by the +max_page_sharing tunable, and an high ratio may indicate fragmentation +in the stable_node dups, which could be solved by introducing +fragmentation algorithms in ksmd which would refile rmap_items from +one stable_node dup to another stable_node dup, in order to freeup +stable_node "dups" with few rmap_items in them, but that may increase +the ksmd CPU usage and possibly slowdown the readonly computations on +the KSM pages of the applications. + Izik Eidus, Hugh Dickins, 17 Nov 2009
mm/ksm.c renamed from mm/ksm.c~ksm-introduce-ksm_max_page_sharing-per-page-deduplication-limit +667 -66
948 lines not on this page · raw message
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>