Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1308867
| From | Jacob Pan <jacob.jun.pan@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls |
| Date | 2016-01-13 23:20 +0100 |
| Message-ID | <qQBVM-634-9@gated-at.bofh.it> (permalink) |
| References | (8 earlier) <qQz7A-44Y-25@gated-at.bofh.it> <qQA3D-4La-9@gated-at.bofh.it> <qQB9o-5uC-13@gated-at.bofh.it> <qQBCq-5Gx-7@gated-at.bofh.it> <qQBM6-5Z4-13@gated-at.bofh.it> |
| Organization | OTC |
On Wed, 13 Jan 2016 23:02:33 +0100 (CET) Thomas Gleixner <tglx@linutronix.de> wrote: > On Wed, 13 Jan 2016, Srinivas Pandruvada wrote: > > On Wed, 2016-01-13 at 22:26 +0100, Borislav Petkov wrote: > > > rmwmsrl_safe_on_cpu(policy->cpu, MSR_IA32_PERF_CTL, > > > INTEL_PERF_CTL_MASK, > > > (u32)sfi_cpufreq_array[next_perf_state].ctr > > > l_val & INTEL_PERF_CTL_MASK); > > > > > > Yikes! > > > > > > So yes, it can work but it is ugly, hard to parse and use, not > > > generic > > > enough, etc, etc. > > > > > > So thanks, but no thanks. > > > > > I agree, in some cases it will not make much sense to use read- > > modify_write calls, the user may decide whether it makes sense or > > not. But such interface is not new to Linux kernel: > > > > regmap_update_bits(), which is referenced for 346 times. > > > > Are you saying that any such calls are not useful? > > There are certainly cases when such calls are useful. And those cases > are when we have a sufficiently big occurence of similar code which > is sufficiently complex to justify the library code and the export. > The balance of pros and cons depends on the number of occurrence. The lib call overhead is constant where saving from the callers are multiplied. Anyway, I will go back to my original code until we have enough callers to tip the balance.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 2/2] powercap/rapl: reduce ipi calls Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-13 02:20 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Thomas Gleixner <tglx@linutronix.de> - 2016-01-13 10:50 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-13 17:30 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Borislav Petkov <bp@alien8.de> - 2016-01-13 17:40 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-13 19:00 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Borislav Petkov <bp@alien8.de> - 2016-01-13 19:10 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-13 19:30 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Borislav Petkov <bp@alien8.de> - 2016-01-13 20:20 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-13 21:20 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Borislav Petkov <bp@alien8.de> - 2016-01-13 22:30 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-01-13 23:00 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Thomas Gleixner <tglx@linutronix.de> - 2016-01-13 23:10 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-13 23:20 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls "H. Peter Anvin" <hpa@zytor.com> - 2016-01-13 23:30 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Borislav Petkov <bp@alien8.de> - 2016-01-13 23:20 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> - 2016-01-13 23:50 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Jacob Pan <jacob.jun.pan@linux.intel.com> - 2016-01-13 23:30 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Borislav Petkov <bp@alien8.de> - 2016-01-13 23:30 +0100
Re: [PATCH v2 2/2] powercap/rapl: reduce ipi calls Thomas Gleixner <tglx@linutronix.de> - 2016-01-13 23:00 +0100
csiph-web