Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1242602

Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm()

From Davidlohr Bueso <dave@stgolabs.net>
Newsgroups linux.kernel
Subject Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm()
Date 2015-10-08 19:00 +0200
Message-ID <qhmHU-UH-9@gated-at.bofh.it> (permalink)
References <qhaQp-Qf-1@gated-at.bofh.it> <qhcSe-3J8-9@gated-at.bofh.it> <qhjqG-4LW-27@gated-at.bofh.it> <qhjK1-58q-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-08 06:20 +0200
  Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-10-08 08:30 +0200
    Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-08 15:30 +0200
      Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2015-10-08 15:50 +0200
        Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-08 19:00 +0200
          Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Davidlohr Bueso <dave@stgolabs.net> - 2015-10-08 19:40 +0200
  Re: [PATCH -next] mm/vmacache: inline vmacache_valid_mm() Andrew Morton <akpm@linux-foundation.org> - 2015-10-09 00:20 +0200

csiph-web