lkml.org 
[lkml]   [2014]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 linux-next] arch/x86/mm: sparse 'tlb_single_page_flush_ceiling' warning
Date
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


\
 
 \ /
  Last update: 2014-08-09 10:01    [W:0.107 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site