Re: [RFC] mm: show message when updating min_free_kbytes in thp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 10 Jan 2014 09:05:04 +0100 Michal Hocko <mhocko@xxxxxxx> wrote:

> > > --- a/mm/huge_memory.c
> > > +++ b/mm/huge_memory.c
> > > @@ -100,6 +100,7 @@ static struct khugepaged_scan khugepaged_scan = {
> > >  	.mm_head = LIST_HEAD_INIT(khugepaged_scan.mm_head),
> > >  };
> > >  
> > > +extern int user_min_free_kbytes;
> > >  
> > 
> > We don't add extern declarations to .c files.  How many other examples of 
> > this can you find in mm/?
> 
> I have suggested this because general visibility is not needed.

It's best to use a common declaration which is seen by the definition
site and all references, so everyone agrees on the variable's type. 
Otherwise we could have "long foo;" in one file and "extern char foo;"
in another and the compiler won't tell us.  I think the linker could
tell us, but it doesn't, afaik.  Perhaps there's an option...

> But if
> you think that it should then include/linux/mm.h sounds like a proper
> place.

mm/internal.h might suit.

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]