Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5901368ybl; Tue, 14 Jan 2020 17:22:53 -0800 (PST) X-Google-Smtp-Source: APXvYqzrJAFzCc+bZ+CbLWw+/JH8U91p8tlehuckh/wRZXJLnF9M6hHbKwazK/O7IzbDRYGJiSXt X-Received: by 2002:a9d:6c99:: with SMTP id c25mr990641otr.178.1579051373089; Tue, 14 Jan 2020 17:22:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579051373; cv=none; d=google.com; s=arc-20160816; b=DbxbFda+pQj1bM2lMrZ40Wd8s+0UNASYe2Omap+TXSe+0q0c2u36xKNI9AgCawv+Mb zzIZSgtFlo0Taihe4sJIfsjALZcCwLoulHg3qngRKS9Om8ZsaJe6n1ViKe+CfL8TrLEh sJVA2NYEMQT3z3PXdBqXRH+zWncjQ38YoYzAdJLn8DYfIIWQeWXlCQt0EW7I2zAtLZpJ DnNy865IKSLpTPaI5c5noUxZYEU4Sg2o8a9e5Mt9GSc4XUvCsduXZo6X5RXfzpyF8uwW Sl+Atb9OnwEn3UCrR7NqMSfQAiuYCdOJq4wCalJneXf/va9t77eAXJGHnEULlvifzqc/ 51eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=GmZJiwFxNItLsMTBfXvTioiHlYRJS1oqfVTCK4e6304=; b=QvtLDhy5Ebeq/V3w7NBgqragRqu92cZ6whGmxEXIyqto9SdJziYFFdUEbSXHvvmB9z vjvBfyXjkqzp6JSzkHJ1XFFZul0PxaSPMUgXf905JXWtp7TvZCyU8k41FMBvsUwzYOL1 iJOqbCE3Hh3D8F+VsymDeTLBBzb0sXkSr7W5NVVEImx0WJ/hQn7uBN/tt8aUKGadkVMq H1fuvbc2RA8kV02//kfRUuQiX1II/EEgCktxG5pqTHLHj46IaUzlbTvWOuItNySlW1dY RQLu5YYf6bEYjC9OwZMBbG75dc+jp7r14hIELQrqKYyqNFpv5CHvIPS668gv7/hYIJO7 e4rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v18si9461779otn.202.2020.01.14.17.22.41; Tue, 14 Jan 2020 17:22:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728877AbgAOBUs (ORCPT + 99 others); Tue, 14 Jan 2020 20:20:48 -0500 Received: from mga11.intel.com ([192.55.52.93]:55773 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728824AbgAOBUs (ORCPT ); Tue, 14 Jan 2020 20:20:48 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2020 17:20:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,320,1574150400"; d="scan'208";a="225800371" Received: from unknown (HELO localhost) ([10.239.159.54]) by orsmga006.jf.intel.com with ESMTP; 14 Jan 2020 17:20:46 -0800 Date: Wed, 15 Jan 2020 09:20:55 +0800 From: Wei Yang To: Li Xinhai Cc: khlebnikov , "richardw.yang" , "linux-mm@kvack.org" , akpm , "linux-kernel@vger.kernel.org" , Rik van Riel , "kirill.shutemov" Subject: Re: [PATCH v2 1/2] mm/rmap: fix and simplify reusing mergeable anon_vma as parent when fork Message-ID: <20200115012055.GC4916@richard> Reply-To: Wei Yang References: <20200110023029.GB16823@richard> <20200110112357351531132@gmail.com> <20200110053442.GA27846@richard> <20200111223820.GA15506@richard> <20200113003343.GA27210@richard> <1cf002fa-a3cb-bcef-57dc-ac9c09dcf2eb@yandex-team.ru> <2020011422424965556826@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2020011422424965556826@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 14, 2020 at 10:42:52PM +0800, Li Xinhai wrote: >On 2020-01-13?at 19:07?Konstantin Khlebnikov?wrote: > >> >>Because I want to keep both heuristics. >>This seems most sane way of interaction between them. >> >>Unfortunately even this patch is slightly broken. >>Condition prev->anon_vma->parent == pvma->anon_vma doesn't guarantee that >>prev vma has the same set of anon-vmas like current vma. >>I.e. anon_vma_clone(vma, prev) might be not enough for keeping connectivity. > >New patch is required? My suggestion is separate the fix and new approach instead of mess them into one patch. >It is necessary to call anon_vma_clone(vma,?pvma) to link all anon_vma which >currently linked by pvma, then link the prev->anon_vma to vma. By this way, >connectivity of vma should be maintained, right? > >>Building such case isn't trivial job but I see nothing that could prevent it. >> > -- Wei Yang Help you, Help me