Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1484554 > unrolled thread

RE: [PATCH v2 10/33] x86/intel_rdt: Implement scheduling support for Intel RDT

Started by"Yu, Fenghua" <fenghua.yu@intel.com>
First post2016-09-15 23:40 +0200
Last post2016-09-15 23:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH v2 10/33] x86/intel_rdt: Implement scheduling support  for Intel RDT "Yu, Fenghua" <fenghua.yu@intel.com> - 2016-09-15 23:40 +0200
    RE: [PATCH v2 10/33] x86/intel_rdt: Implement scheduling support  for Intel RDT "Luck, Tony" <tony.luck@intel.com> - 2016-09-15 23:50 +0200

#1484554 — RE: [PATCH v2 10/33] x86/intel_rdt: Implement scheduling support for Intel RDT

From"Yu, Fenghua" <fenghua.yu@intel.com>
Date2016-09-15 23:40 +0200
SubjectRE: [PATCH v2 10/33] x86/intel_rdt: Implement scheduling support for Intel RDT
Message-ID<shMxX-3WU-3@gated-at.bofh.it>
> From: Thomas Gleixner [mailto:tglx@linutronix.de]
> Sent: Thursday, September 08, 2016 2:54 AM
> 
> On Thu, 8 Sep 2016, Fenghua Yu wrote:
> > +extern struct static_key rdt_enable_key; void
> > +__intel_rdt_sched_in(void *dummy);
> > +
> >  struct clos_cbm_table {
> >  	unsigned long cbm;
> >  	unsigned int clos_refcnt;
> >  };
> >
> > +/*
> > + * intel_rdt_sched_in() - Writes the task's CLOSid to IA32_PQR_MSR
> > + *
> > + * Following considerations are made so that this has minimal impact
> > + * on scheduler hot path:
> > + * - This will stay as no-op unless we are running on an Intel SKU
> > + * which supports L3 cache allocation.
> > + * - When support is present and enabled, does not do any
> > + * IA32_PQR_MSR writes until the user starts really using the feature
> > + * ie creates a rdtgroup directory and assigns a cache_mask thats
> > + * different from the root rdtgroup's cache_mask.
> > + * - Caches the per cpu CLOSid values and does the MSR write only
> > + * when a task with a different CLOSid is scheduled in. That
> > + * means the task belongs to a different rdtgroup.
> > + * - Closids are allocated so that different rdtgroup directories
> > + * with same cache_mask gets the same CLOSid. This minimizes CLOSids
> > + * used and reduces MSR write frequency.
> > + */
> > +static inline void intel_rdt_sched_in(void) {
> > +	/*
> > +	 * Call the schedule in code only when RDT is enabled.
> > +	 */
> > +	if (static_key_false(&rdt_enable_key))
> 
> static_branch_[un]likely() is the proper function to use.

How to do this? Should I change the line to

+ if (static_branch_unlikely(&rdt_enable_key))
?

Thanks.

-Fenghua

[toc] | [next] | [standalone]


#1484559

From"Luck, Tony" <tony.luck@intel.com>
Date2016-09-15 23:50 +0200
Message-ID<shMHD-40l-13@gated-at.bofh.it>
In reply to#1484554
> How to do this? Should I change the line to
>
> + if (static_branch_unlikely(&rdt_enable_key))?

See Documentation/static-keys.txt, there are some examples.

also "git grep static_branch_unlikely" to see existing users

-Tony

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web