All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghua.yu@intel.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Fenghua Yu <fenghua.yu@intel.com>, Jiri Olsa <jolsa@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Mike Galbraith <efault@gmx.de>, Shaohua Li <shli@fb.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] x86/intel_rdt: Add cpus_list rdtgroup file
Date: Fri, 31 Mar 2017 08:40:12 -0700	[thread overview]
Message-ID: <20170331154012.GC24537@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1703311104300.1780@nanos>

On Fri, Mar 31, 2017 at 11:15:22AM +0200, Thomas Gleixner wrote:
> On Wed, 29 Mar 2017, Fenghua Yu wrote:
> > >  static int rdtgroup_cpus_show(struct kernfs_open_file *of,
> > > -			      struct seq_file *s, void *v)
> > > +			      struct seq_file *s, void *v,
> > > +			      unsigned long flags)
> > >  {
> > > +	const char *fmt = flags & RFTYPE_FLAGS_CPUS_LIST ? "%*pbl\n" : "%*pb\n";
> > 
> > Change to:
> > + const char *fmt = strcmp(of->kn->priv, "cpus") ? "%*pbl\n" : "%*pb\n";
> 
> You couldn't come up with a more horrible hack, right?
> 
> Jiri was right with adding the flag to the base files, just the propagation
> through the callbacks sucks. What's wrong with:
> 
> 	struct rftype *rft = of->kn->priv;
> 	bool list = rtf->flags & RFTYPE_FLAGS_CPUS_LIST;

You are absolutely correct.

Thanks.

-Fenghua

  reply	other threads:[~2017-03-31 15:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 15:09 [PATCH] x86/intel_rdt: Add cpus_list rdtgroup file Jiri Olsa
2017-03-29 16:08 ` Fenghua Yu
2017-03-29 16:16   ` Jiri Olsa
2017-03-30 14:59     ` Jiri Olsa
2017-04-01  2:00       ` Fenghua Yu
2017-03-31  8:47   ` Thomas Gleixner
2017-03-31 15:53     ` Fenghua Yu
2017-03-31  9:15   ` Thomas Gleixner
2017-03-31 15:40     ` Fenghua Yu [this message]
2017-03-31 15:55     ` Jiri Olsa
2017-04-09 16:49       ` [PATCHv2] " Jiri Olsa
2017-04-09 17:38         ` Fenghua Yu
2017-04-10  7:40           ` [PATCHv3] " Jiri Olsa
2017-04-10  9:45             ` Thomas Gleixner
2017-04-10 14:52               ` [PATCHv4] " Jiri Olsa
2017-04-10 17:16                 ` [tip:x86/cpu] " tip-bot for Jiri Olsa
2017-04-10  9:14           ` [PATCHv2] " Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170331154012.GC24537@linux.intel.com \
    --to=fenghua.yu@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=shli@fb.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.