All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm,vmacache: inline vmacache_valid_mm()
@ 2014-07-04 21:08 ` Davidlohr Bueso
  0 siblings, 0 replies; 4+ messages in thread
From: Davidlohr Bueso @ 2014-07-04 21:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: davidlohr, linux-kernel, linux-mm

From: Davidlohr Bueso <davidlohr@hp.com>

No brainer for this little function.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
---
 mm/vmacache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmacache.c b/mm/vmacache.c
index 9f25af8..e72b8ee 100644
--- a/mm/vmacache.c
+++ b/mm/vmacache.c
@@ -50,7 +50,7 @@ void vmacache_flush_all(struct mm_struct *mm)
  * 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)
+static inline bool vmacache_valid_mm(struct mm_struct *mm)
 {
 	return current->mm == mm && !(current->flags & PF_KTHREAD);
 }
-- 
1.8.1.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] mm,vmacache: inline vmacache_valid_mm()
@ 2014-07-04 21:08 ` Davidlohr Bueso
  0 siblings, 0 replies; 4+ messages in thread
From: Davidlohr Bueso @ 2014-07-04 21:08 UTC (permalink / raw)
  To: Andrew Morton; +Cc: davidlohr, linux-kernel, linux-mm

From: Davidlohr Bueso <davidlohr@hp.com>

No brainer for this little function.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
---
 mm/vmacache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/vmacache.c b/mm/vmacache.c
index 9f25af8..e72b8ee 100644
--- a/mm/vmacache.c
+++ b/mm/vmacache.c
@@ -50,7 +50,7 @@ void vmacache_flush_all(struct mm_struct *mm)
  * 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)
+static inline bool vmacache_valid_mm(struct mm_struct *mm)
 {
 	return current->mm == mm && !(current->flags & PF_KTHREAD);
 }
-- 
1.8.1.4



--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm,vmacache: inline vmacache_valid_mm()
  2014-07-04 21:08 ` Davidlohr Bueso
@ 2014-07-07 22:07   ` Andrew Morton
  -1 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2014-07-07 22:07 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: linux-kernel, linux-mm

On Fri, 04 Jul 2014 14:08:03 -0700 Davidlohr Bueso <davidlohr@hp.com> wrote:

> From: Davidlohr Bueso <davidlohr@hp.com>
> 
> No brainer for this little function.
> 
> ...
>
> --- a/mm/vmacache.c
> +++ b/mm/vmacache.c
> @@ -50,7 +50,7 @@ void vmacache_flush_all(struct mm_struct *mm)
>   * 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)
> +static inline bool vmacache_valid_mm(struct mm_struct *mm)
>  {
>  	return current->mm == mm && !(current->flags & PF_KTHREAD);
>  }

The patch doesn't actually do anything.

- gcc ignores `inline'

- gcc will inline this function anwyay

- if we really really need a hammer, we use __always_inline, along
  with a comment explaining why.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mm,vmacache: inline vmacache_valid_mm()
@ 2014-07-07 22:07   ` Andrew Morton
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2014-07-07 22:07 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: linux-kernel, linux-mm

On Fri, 04 Jul 2014 14:08:03 -0700 Davidlohr Bueso <davidlohr@hp.com> wrote:

> From: Davidlohr Bueso <davidlohr@hp.com>
> 
> No brainer for this little function.
> 
> ...
>
> --- a/mm/vmacache.c
> +++ b/mm/vmacache.c
> @@ -50,7 +50,7 @@ void vmacache_flush_all(struct mm_struct *mm)
>   * 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)
> +static inline bool vmacache_valid_mm(struct mm_struct *mm)
>  {
>  	return current->mm == mm && !(current->flags & PF_KTHREAD);
>  }

The patch doesn't actually do anything.

- gcc ignores `inline'

- gcc will inline this function anwyay

- if we really really need a hammer, we use __always_inline, along
  with a comment explaining why.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-07 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-04 21:08 [PATCH] mm,vmacache: inline vmacache_valid_mm() Davidlohr Bueso
2014-07-04 21:08 ` Davidlohr Bueso
2014-07-07 22:07 ` Andrew Morton
2014-07-07 22:07   ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.