Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-07 Thread Hugh Dickins
On Mon, 7 Jan 2013, Simon Jeons wrote: > On Thu, 2013-01-03 at 13:24 +0100, Petr Holasek wrote: > > Hi Simon, > > > > On Mon, 31 Dec 2012, Simon Jeons wrote: > > > On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: > > > > > > > > v7: - added sysfs ABI documentation for KSM > > > > > >

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-07 Thread Simon Jeons
On Thu, 2013-01-03 at 13:24 +0100, Petr Holasek wrote: > Hi Simon, > > On Mon, 31 Dec 2012, Simon Jeons wrote: > > On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: > > > > > > v7: - added sysfs ABI documentation for KSM > > > > Hi Petr, > > > > How you handle "memory corruption

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-07 Thread Simon Jeons
On Thu, 2013-01-03 at 13:24 +0100, Petr Holasek wrote: Hi Simon, On Mon, 31 Dec 2012, Simon Jeons wrote: On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: v7: - added sysfs ABI documentation for KSM Hi Petr, How you handle memory corruption because the ksm page

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-07 Thread Hugh Dickins
On Mon, 7 Jan 2013, Simon Jeons wrote: On Thu, 2013-01-03 at 13:24 +0100, Petr Holasek wrote: Hi Simon, On Mon, 31 Dec 2012, Simon Jeons wrote: On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: v7: - added sysfs ABI documentation for KSM Hi Petr, How you

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-04 Thread Simon Jeons
On Fri, 2013-01-04 at 15:03 -0800, Hugh Dickins wrote: > On Thu, 3 Jan 2013, Simon Jeons wrote: > > On Wed, 2013-01-02 at 21:10 -0800, Hugh Dickins wrote: > > > > > > As you can see, remove_rmap_item_from_tree uses it to decide whether > > > or not it should rb_erase the rmap_item from the

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-04 Thread Hugh Dickins
On Thu, 3 Jan 2013, Simon Jeons wrote: > On Wed, 2013-01-02 at 21:10 -0800, Hugh Dickins wrote: > > > > As you can see, remove_rmap_item_from_tree uses it to decide whether > > or not it should rb_erase the rmap_item from the unstable_tree. > > > > Every full scan of all the rmap_items, we

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-04 Thread Hugh Dickins
On Thu, 3 Jan 2013, Simon Jeons wrote: On Wed, 2013-01-02 at 21:10 -0800, Hugh Dickins wrote: As you can see, remove_rmap_item_from_tree uses it to decide whether or not it should rb_erase the rmap_item from the unstable_tree. Every full scan of all the rmap_items, we increment

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-04 Thread Simon Jeons
On Fri, 2013-01-04 at 15:03 -0800, Hugh Dickins wrote: On Thu, 3 Jan 2013, Simon Jeons wrote: On Wed, 2013-01-02 at 21:10 -0800, Hugh Dickins wrote: As you can see, remove_rmap_item_from_tree uses it to decide whether or not it should rb_erase the rmap_item from the unstable_tree.

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-03 Thread Simon Jeons
On Wed, 2013-01-02 at 21:10 -0800, Hugh Dickins wrote: > On Tue, 1 Jan 2013, Simon Jeons wrote: > > > > Hi Petr and Hugh, > > > > One offline question, thanks for your clarify. > > Perhaps not as offline as you intended :) Hi Hugh, Thanks for your detail explanation. :) > > > > > How to

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-03 Thread Petr Holasek
Hi Simon, On Mon, 31 Dec 2012, Simon Jeons wrote: > On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: > > > > v7: - added sysfs ABI documentation for KSM > > Hi Petr, > > How you handle "memory corruption because the ksm page still points to > the stable_node that has been freed"

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-03 Thread Petr Holasek
Hi Simon, On Mon, 31 Dec 2012, Simon Jeons wrote: On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: v7: - added sysfs ABI documentation for KSM Hi Petr, How you handle memory corruption because the ksm page still points to the stable_node that has been freed mentioned by Andrea

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-03 Thread Simon Jeons
On Wed, 2013-01-02 at 21:10 -0800, Hugh Dickins wrote: On Tue, 1 Jan 2013, Simon Jeons wrote: Hi Petr and Hugh, One offline question, thanks for your clarify. Perhaps not as offline as you intended :) Hi Hugh, Thanks for your detail explanation. :) How to understand age =

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-02 Thread Hugh Dickins
On Tue, 1 Jan 2013, Simon Jeons wrote: > > Hi Petr and Hugh, > > One offline question, thanks for your clarify. Perhaps not as offline as you intended :) > > How to understand age = (unsigned char)(ksm_scan.seqnr - > rmap_item->address);? It used for what? As you can see,

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-02 Thread Hugh Dickins
On Tue, 1 Jan 2013, Simon Jeons wrote: Hi Petr and Hugh, One offline question, thanks for your clarify. Perhaps not as offline as you intended :) How to understand age = (unsigned char)(ksm_scan.seqnr - rmap_item-address);? It used for what? As you can see, remove_rmap_item_from_tree

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-01 Thread Simon Jeons
On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: > Introduces new sysfs boolean knob /sys/kernel/mm/ksm/merge_across_nodes > which control merging pages across different numa nodes. > When it is set to zero only pages from the same node are merged, > otherwise pages from all nodes can be

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2013-01-01 Thread Simon Jeons
On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: Introduces new sysfs boolean knob /sys/kernel/mm/ksm/merge_across_nodes which control merging pages across different numa nodes. When it is set to zero only pages from the same node are merged, otherwise pages from all nodes can be merged

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2012-12-31 Thread Simon Jeons
On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: > Introduces new sysfs boolean knob /sys/kernel/mm/ksm/merge_across_nodes > which control merging pages across different numa nodes. > When it is set to zero only pages from the same node are merged, > otherwise pages from all nodes can be

Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob

2012-12-31 Thread Simon Jeons
On Fri, 2012-12-28 at 02:32 +0100, Petr Holasek wrote: Introduces new sysfs boolean knob /sys/kernel/mm/ksm/merge_across_nodes which control merging pages across different numa nodes. When it is set to zero only pages from the same node are merged, otherwise pages from all nodes can be merged

[PATCH v7 1/2] KSM: numa awareness sysfs knob

2012-12-27 Thread Petr Holasek
Introduces new sysfs boolean knob /sys/kernel/mm/ksm/merge_across_nodes which control merging pages across different numa nodes. When it is set to zero only pages from the same node are merged, otherwise pages from all nodes can be merged together (default behavior). Typical use-case could be a

[PATCH v7 1/2] KSM: numa awareness sysfs knob

2012-12-27 Thread Petr Holasek
Introduces new sysfs boolean knob /sys/kernel/mm/ksm/merge_across_nodes which control merging pages across different numa nodes. When it is set to zero only pages from the same node are merged, otherwise pages from all nodes can be merged together (default behavior). Typical use-case could be a