Re: [PATCH] Expose sysctls for enabling slab/file_cache interleaving

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

 



On Tue 19-11-13 12:13:33, Andi Kleen wrote:
> On Tue, Nov 19, 2013 at 08:11:35PM +0100, Michal Hocko wrote:
> > On Tue 19-11-13 19:42:00, Andi Kleen wrote:
> > > On Tue, Nov 19, 2013 at 11:42:03AM +0100, Michal Hocko wrote:
> > > > On Mon 18-11-13 16:50:22, Andi Kleen wrote:
> > > > [...]
> > > > > diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
> > > > > index cc1b01c..10966f5 100644
> > > > > --- a/include/linux/cpuset.h
> > > > > +++ b/include/linux/cpuset.h
> > > > > @@ -72,12 +72,14 @@ extern int cpuset_slab_spread_node(void);
> > > > >  
> > > > >  static inline int cpuset_do_page_mem_spread(void)
> > > > >  {
> > > > > -	return current->flags & PF_SPREAD_PAGE;
> > > > > +	return (current->flags & PF_SPREAD_PAGE) ||
> > > > > +		sysctl_spread_file_cache;
> > > > >  }
> > > > 
> > > > But this might break applications that explicitly opt out from
> > > > spreading.
> > > 
> > > What do you mean? There's no such setting at the moment.
> > > 
> > > They can only enable it.
> > 
> > cpuset_update_task_spread_flag allows disabling both flags. You can do
> > so for example via cpuset cgroup controller.
> 
> Ok.
> 
> So you're saying it should look up the cpuset. I'm reluctant do 
> that. It would make this path quite a bit more expensive.

Another option would be to use sysctl values for the top cpuset as a
default. But then why not just do it manually without sysctl?
 
> Is it really a big problem to override that setting with
> the global sysctl. Seems like sensible semantics for me.

If you create a cpuset and explicitly disable spreading then you would
be quite surprised that your process gets pages from all nodes, no?

> 
> -Andi

-- 
Michal Hocko
SUSE Labs

--
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]