From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964876AbbJHQz5 (ORCPT ); Thu, 8 Oct 2015 12:55:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:50972 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933871AbbJHQzz (ORCPT ); Thu, 8 Oct 2015 12:55:55 -0400 Date: Thu, 8 Oct 2015 09:55:39 -0700 From: Davidlohr Bueso To: Sergey Senozhatsky Cc: Sergey Senozhatsky , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Message-ID: <20151008165539.GA2594@linux-uzut.site> Mail-Followup-To: Sergey Senozhatsky , Sergey Senozhatsky , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Davidlohr Bueso References: <1444277879-22039-1-git-send-email-dave@stgolabs.net> <20151008062115.GA876@swordfish> <20151008132331.GC3353@linux-uzut.site> <20151008134358.GA601@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20151008134358.GA601@swordfish> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 08 Oct 2015, Sergey Senozhatsky wrote: >> >+/* >> >+ * This task may be accessing a foreign mm via (for example) >> >+ * get_user_pages()->find_vma(). The vmacache is task-local and this >> >+ * task's vmacache pertains to a different mm (ie, its own). There is >> >+ * nothing we can do here. >> >+ * >> >+ * Also handle the case where a kernel thread has adopted this mm via use_mm(). >> >+ * That kernel thread's vmacache is not applicable to this mm. >> >+ */ >> >+static bool vmacache_valid_mm(struct mm_struct *mm) >> >> This needs (explicit) inlined, no? >> > >oh, yeah. Funny how I said "both `static inline'" and made 'inline' only >one of them. Thinking a bit more about it, we don't want to be making vmacache_valid_mm() visible, as users should only stick to vmacache_valid() calls. I doubt that this would infact ever occur, but it's a bad idea regardless. So I'd rather keep my patch as is. Yes, the compiler can already inline it for us, but making it explicit is certainly won't harm. Thanks, Davidlohr