From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756248AbcEQQbB (ORCPT ); Tue, 17 May 2016 12:31:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50805 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753478AbcEQQa7 (ORCPT ); Tue, 17 May 2016 12:30:59 -0400 Date: Tue, 17 May 2016 18:30:44 +0200 From: Oleg Nesterov To: Michal Hocko Cc: Andrew Morton , Andrea Arcangeli , Linus Torvalds , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 1/1] userfaultfd: don't pin the user memory in userfaultfd_file_create() Message-ID: <20160517163044.GA31867@redhat.com> References: <20160516152522.GA19120@redhat.com> <20160516152546.GA19129@redhat.com> <20160516172254.GA8595@redhat.com> <20160517153302.GE14446@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160517153302.GE14446@dhcp22.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 17 May 2016 16:30:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/17, Michal Hocko wrote: > > On Mon 16-05-16 19:22:54, Oleg Nesterov wrote: > > > The patch adds the new trivial helper, mmget_not_zero(), it can have more users. > > Is this really helpful? Well, this is subjective of course, but I think the code looks a bit better this way. uprobes, fs/proc and more can use this helper too. And in fact the initial version of this patch did atomic_inc_not_zero(mm->users) by hand, then it was suggested to add a helper. > > Signed-off-by: Oleg Nesterov > > The patch seems good to me but I am not familiar with the userfaultfd > internals enought to give you reviewed-by nor acked-by. I welcome the > change anyway. Thanks ;) Oleg.