Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1036609AbdD3E5X (ORCPT ); Sun, 30 Apr 2017 00:57:23 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:34112 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1035310AbdD3E5N (ORCPT ); Sun, 30 Apr 2017 00:57:13 -0400 Date: Sat, 29 Apr 2017 21:57:06 -0700 From: Matthew Wilcox To: Laurent Dufour Cc: paulmck@linux.vnet.ibm.com, peterz@infradead.org, akpm@linux-foundation.org, kirill@shutemov.name, ak@linux.intel.com, mhocko@kernel.org, dave@stgolabs.net, jack@suse.cz, linux-kernel@vger.kernel.org, linux-mm@kvack.org, haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, bsingharora@gmail.com Subject: Re: [RFC v3 05/17] RCU free VMAs Message-ID: <20170430045706.GG27790@bombadil.infradead.org> References: <1493308376-23851-1-git-send-email-ldufour@linux.vnet.ibm.com> <1493308376-23851-6-git-send-email-ldufour@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493308376-23851-6-git-send-email-ldufour@linux.vnet.ibm.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 554 Lines: 14 On Thu, Apr 27, 2017 at 05:52:44PM +0200, Laurent Dufour wrote: > @@ -359,6 +359,7 @@ struct vm_area_struct { > #endif > struct vm_userfaultfd_ctx vm_userfaultfd_ctx; > seqcount_t vm_sequence; > + struct rcu_head vm_rcu_head; > }; > > struct core_thread { It doesn't look like we examine the contents of the VMA until after we've checked that the seqlock is good, so we should be able to union virtually any entry in the VMA with the vm_rcu_head. vm_next, vm_prev, perhaps? Or anon_vma_chain since a list_head is the same size as an rcu_head.