From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753851Ab3AHBkd (ORCPT ); Mon, 7 Jan 2013 20:40:33 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:35396 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753115Ab3AHBkc (ORCPT ); Mon, 7 Jan 2013 20:40:32 -0500 Message-ID: <1357609227.4105.3.camel@kernel.cn.ibm.com> Subject: Re: [PATCH v7 1/2] KSM: numa awareness sysfs knob From: Simon Jeons To: Petr Holasek Cc: Hugh Dickins , Andrea Arcangeli , Andrew Morton , Izik Eidus , Rik van Riel , David Rientjes , Sasha Levin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Anton Arapov Date: Mon, 07 Jan 2013 19:40:27 -0600 In-Reply-To: <20130103122416.GB2277@thinkpad-work.redhat.com> References: <20121224050817.GA25749@kroah.com> <1356658337-12540-1-git-send-email-pholasek@redhat.com> <1357015310.1379.2.camel@kernel.cn.ibm.com> <20130103122416.GB2277@thinkpad-work.redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4 (3.4.4-2.fc17) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 still points to > > the stable_node that has been freed" mentioned by Andrea this time? > > > Hi Petr, You still didn't answer my question mentioned above. :) > > > > > > > > + /* > > > + * If tree_page has been migrated to another NUMA node, it > > > + * will be flushed out and put into the right unstable tree > > > + * next time: only merge with it if merge_across_nodes. > > > > Why? Do you mean swap based migration? Or where I miss ....? > > > > It can be physical page migration triggered by page compaction, memory hotplug > or some NUMA sched/memory balancing algorithm developed recently. > > > > + * Just notice, we don't have similar problem for PageKsm > > > + * because their migration is disabled now. (62b61f611e) > > > + */ > > Migration of KSM pages is disabled now, you can look into ^^^ commit and > changes introduced to migrate.c. > > > > + if (!ksm_merge_across_nodes && page_to_nid(tree_page) != nid) { > > > + put_page(tree_page); > > > + return NULL; > > > + } > > > + > > > ret = memcmp_pages(page, tree_page); > >