From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752507AbcFWXte (ORCPT ); Thu, 23 Jun 2016 19:49:34 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51534 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752223AbcFWXtc (ORCPT ); Thu, 23 Jun 2016 19:49:32 -0400 Date: Thu, 23 Jun 2016 16:49:31 -0700 From: Andrew Morton To: Cc: , , , , , , , , , Subject: Re: [PATCH] ksm: set anon_vma of first rmap_item of ksm page to page's anon_vma other than vma's anon_vma Message-Id: <20160623164931.da352f7e6f4b115aba13f37e@linux-foundation.org> In-Reply-To: <1466688834-127613-1-git-send-email-zhouxianrong@huawei.com> References: <1466688834-127613-1-git-send-email-zhouxianrong@huawei.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 23 Jun 2016 21:33:54 +0800 wrote: > From: z00281421 > > set anon_vma of first rmap_item of ksm page to page's anon_vma > other than vma's anon_vma so that we can lookup all the forked > vma of kpage via reserve map. thus we can try_to_unmap ksm page > completely and reclaim or migrate the ksm page successfully and > need not to merg other forked vma addresses of ksm page with > building a rmap_item for it ever after. > > a forked more mapcount ksm page with partially merged vma addresses and > a ksm page mapped into non-VM_MERGEABLE vma due to setting MADV_MERGEABLE > on one of the forked vma can be unmapped completely by try_to_unmap. > hm, OK, so this is an efficiency increase rather than a functional change? If so, are you able to quantify the benefit? ie, how much faster did things get? I'll queue it up and shall await Hugh review (please).