All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning
@ 2014-08-08  7:24 Jeremiah Mahler
  2014-08-08 22:03 ` David Rientjes
  0 siblings, 1 reply; 5+ messages in thread
From: Jeremiah Mahler @ 2014-08-08  7:24 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Rik van Riel,
	Mel Gorman, Andrew Morton, linux-kernel, Jeremiah Mahler

A sparse warning is generated about 'tlb_single_page_flush_ceiling'
not being declared.

  arch/x86/mm/tlb.c:177:15: warning: symbol
  'tlb_single_page_flush_ceiling' was not declared. Should it be static?

Since it isn't used anywhere outside this file, fix the warning by
making it static.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
---
 arch/x86/mm/tlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 1fe3398..fff4a4c 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -174,7 +174,7 @@ void flush_tlb_current_task(void)
  *
  * This is in units of pages.
  */
-unsigned long tlb_single_page_flush_ceiling = 33;
+static unsigned long tlb_single_page_flush_ceiling = 33;
 
 void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
 				unsigned long end, unsigned long vmflag)
-- 
2.1.0.rc1


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

* Re: [PATCH linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning
  2014-08-08  7:24 [PATCH linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning Jeremiah Mahler
@ 2014-08-08 22:03 ` David Rientjes
  2014-08-09  7:38   ` [PATCH v2 " Jeremiah Mahler
  0 siblings, 1 reply; 5+ messages in thread
From: David Rientjes @ 2014-08-08 22:03 UTC (permalink / raw)
  To: Jeremiah Mahler
  Cc: Dave Hansen, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Rik van Riel, Mel Gorman, Andrew Morton, linux-kernel

On Fri, 8 Aug 2014, Jeremiah Mahler wrote:

> A sparse warning is generated about 'tlb_single_page_flush_ceiling'
> not being declared.
> 
>   arch/x86/mm/tlb.c:177:15: warning: symbol
>   'tlb_single_page_flush_ceiling' was not declared. Should it be static?
> 
> Since it isn't used anywhere outside this file, fix the warning by
> making it static.
> 
> Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>

Seems like __read_mostly would also be in order?

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

* [PATCH v2 linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning
  2014-08-08 22:03 ` David Rientjes
@ 2014-08-09  7:38   ` Jeremiah Mahler
  2014-08-10  7:46     ` [tip:x86/urgent] x86/mm: Fix sparse ' tlb_single_page_flush_ceiling' warning and make the variable read-mostly tip-bot for Jeremiah Mahler
  2014-08-11 17:24     ` [PATCH v2 linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning Dave Hansen
  0 siblings, 2 replies; 5+ messages in thread
From: Jeremiah Mahler @ 2014-08-09  7:38 UTC (permalink / raw)
  To: David Rientjes
  Cc: Dave Hansen, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Rik van Riel, Mel Gorman, Andrew Morton, linux-kernel,
	Jeremiah Mahler

A sparse warning is generated about 'tlb_single_page_flush_ceiling'
not being declared.

  arch/x86/mm/tlb.c:177:15: warning: symbol
  'tlb_single_page_flush_ceiling' was not declared. Should it be static?

Since it isn't used anywhere outside this file, fix the warning by
making it static.

Also, optimize the use of this variable by adding the __read_mostly
directive.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Suggested-by: David Rientjes <rientjes@google.com>
---

Notes:
    I like the suggestion from David Rientjes, to add __read_mostly.
    Patch updated.

 arch/x86/mm/tlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 1fe3398..bbe5766 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -174,7 +174,7 @@ void flush_tlb_current_task(void)
  *
  * This is in units of pages.
  */
-unsigned long tlb_single_page_flush_ceiling = 33;
+static unsigned long tlb_single_page_flush_ceiling __read_mostly = 33;
 
 void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
 				unsigned long end, unsigned long vmflag)
-- 
2.1.0.rc1


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

* [tip:x86/urgent] x86/mm: Fix sparse ' tlb_single_page_flush_ceiling' warning and make the variable read-mostly
  2014-08-09  7:38   ` [PATCH v2 " Jeremiah Mahler
@ 2014-08-10  7:46     ` tip-bot for Jeremiah Mahler
  2014-08-11 17:24     ` [PATCH v2 linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning Dave Hansen
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Jeremiah Mahler @ 2014-08-10  7:46 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, jmmahler, riel, mgorman, tglx,
	dave.hansen, rientjes

Commit-ID:  86426851c38d3fe84dee34d7daa71d26c174d409
Gitweb:     http://git.kernel.org/tip/86426851c38d3fe84dee34d7daa71d26c174d409
Author:     Jeremiah Mahler <jmmahler@gmail.com>
AuthorDate: Sat, 9 Aug 2014 00:38:33 -0700
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 10 Aug 2014 09:07:18 +0200

x86/mm: Fix sparse 'tlb_single_page_flush_ceiling' warning and make the variable read-mostly

A sparse warning is generated about
'tlb_single_page_flush_ceiling' not being declared.

  arch/x86/mm/tlb.c:177:15: warning: symbol
  'tlb_single_page_flush_ceiling' was not declared. Should it be static?

Since it isn't used anywhere outside this file, fix the warning
by making it static.

Also, optimize the use of this variable by adding the
__read_mostly directive, as suggested by David Rientjes.

Suggested-by: David Rientjes <rientjes@google.com>
Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Link: http://lkml.kernel.org/r/1407569913-4035-1-git-send-email-jmmahler@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/mm/tlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 98b7976..ee61c36 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -180,7 +180,7 @@ void flush_tlb_current_task(void)
  *
  * This is in units of pages.
  */
-unsigned long tlb_single_page_flush_ceiling = 33;
+static unsigned long tlb_single_page_flush_ceiling __read_mostly = 33;
 
 void flush_tlb_mm_range(struct mm_struct *mm, unsigned long start,
 				unsigned long end, unsigned long vmflag)

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

* Re: [PATCH v2 linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning
  2014-08-09  7:38   ` [PATCH v2 " Jeremiah Mahler
  2014-08-10  7:46     ` [tip:x86/urgent] x86/mm: Fix sparse ' tlb_single_page_flush_ceiling' warning and make the variable read-mostly tip-bot for Jeremiah Mahler
@ 2014-08-11 17:24     ` Dave Hansen
  1 sibling, 0 replies; 5+ messages in thread
From: Dave Hansen @ 2014-08-11 17:24 UTC (permalink / raw)
  To: Jeremiah Mahler, David Rientjes
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Rik van Riel,
	Mel Gorman, Andrew Morton, linux-kernel

On 08/09/2014 12:38 AM, Jeremiah Mahler wrote:
> A sparse warning is generated about 'tlb_single_page_flush_ceiling'
> not being declared.
> 
>   arch/x86/mm/tlb.c:177:15: warning: symbol
>   'tlb_single_page_flush_ceiling' was not declared. Should it be static?
> 
> Since it isn't used anywhere outside this file, fix the warning by
> making it static.
> 
> Also, optimize the use of this variable by adding the __read_mostly
> directive.

Looks fine to me.  It's definitely __read_mostly.

Acked-by: Dave Hansen <dave.hansen@linux.intel.com>

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

end of thread, other threads:[~2014-08-11 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-08  7:24 [PATCH linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning Jeremiah Mahler
2014-08-08 22:03 ` David Rientjes
2014-08-09  7:38   ` [PATCH v2 " Jeremiah Mahler
2014-08-10  7:46     ` [tip:x86/urgent] x86/mm: Fix sparse ' tlb_single_page_flush_ceiling' warning and make the variable read-mostly tip-bot for Jeremiah Mahler
2014-08-11 17:24     ` [PATCH v2 linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning Dave Hansen

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.