From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751868AbbINRtE (ORCPT ); Mon, 14 Sep 2015 13:49:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46059 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951AbbINRtC (ORCPT ); Mon, 14 Sep 2015 13:49:02 -0400 Date: Mon, 14 Sep 2015 19:46:09 +0200 From: Oleg Nesterov To: "Kirill A. Shutemov" Cc: Will Deacon , hpa@zytor.com, luto@amacapital.net, dave.hansen@linux.intel.com, mingo@elte.hu, minchan@kernel.org, tglx@linutronix.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: LTP regressions due to 6dc296e7df4c ("mm: make sure all file VMAs have ->vm_ops set") Message-ID: <20150914174609.GA30917@redhat.com> References: <20150914105346.GB23878@arm.com> <20150914115800.06242CE@black.fi.intel.com> <20150914170547.GA28535@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150914170547.GA28535@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/14, Oleg Nesterov wrote: > > On 09/14, Kirill A. Shutemov wrote: > > > > Fix is below. I don't really like it, but I cannot find any better > > solution. > > Me too... > > But this change "documents" the nasty special "vm_file && !vm_ops" case, and > I am not sure how we can remove it later... > > So perhaps we should change vma_is_anonymous() back to check ->fault too, > > static inline bool vma_is_anonymous(struct vm_area_struct *vma) > { > - return !vma->vm_ops; > + return !vma->vm_ops || !vma->vm_ops->fault; > } > > and remove the "vma->vm_file && !vma->vm_ops" checks in mmap_region() paths. ^^^ sorry, I actually meant "or remove". But perhaps "and" makes sense too. Say, if we change vma_is_anonymous() as above, then we can kill arch_vma_name() on x86. mpx_mmap() can install the dummy vm_ops with the single ->name() method. > I dunno. Yes. Up to you. Oleg.