Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1685346
| From | Shivappa Vikas <vikas.shivappa@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 14/21] x86/intel_rdt/cqm: Add mon_data |
| Date | 2017-07-11 23:20 +0200 |
| Message-ID | <u2aJA-7t8-5@gated-at.bofh.it> (permalink) |
| References | <tWHoR-5Yd-3@gated-at.bofh.it> <tWHoT-5Yd-49@gated-at.bofh.it> <tYMu5-1Un-3@gated-at.bofh.it> <u0mOS-2P4-1@gated-at.bofh.it> <u0uW6-8qy-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 6 Jul 2017, Thomas Gleixner wrote:
> On Thu, 6 Jul 2017, Shivappa Vikas wrote:
>> On Sun, 2 Jul 2017, Thomas Gleixner wrote:
>>>> +static bool __mon_event_count(u32 rmid, struct rmid_read *rr)
>>>> +{
>>>> + u64 tval;
>>>> +
>>>> + tval = __rmid_read(rmid, rr->evtid);
>>>> + if (tval & (RMID_VAL_ERROR | RMID_VAL_UNAVAIL)) {
>>>> + rr->val = tval;
>>>> + return false;
>>>> + }
>>>> + switch (rr->evtid) {
>>>> + case QOS_L3_OCCUP_EVENT_ID:
>>>> + rr->val += tval;
>>>> + return true;
>>>> + default:
>>>> + return false;
>>>
>>> I have no idea what that return code means.
>>
>> false for the invalid event id and all errors for __rmid_read. (IOW all errors
>> for __mon_event-read)
>
> Sure, but why bool? What's wrong with proper error return codes, so issues
> can be distinguished and potentially propagated in the callchain?
Ok, The error is propagated wih the rr->val actually. is this better?
Hardware throws the RMID_VAL_ERROR (bit 63) when an invalid RMID or
event is written to event select - this case seems similar.
default:
rr->val = RMID_VAL_ERROR;
return -EINVAL;
}
Thanks,
Vikas
>
> Thanks,
>
> tglx
>
>
>
>
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 14/21] x86/intel_rdt/cqm: Add mon_data Shivappa Vikas <vikas.shivappa@intel.com> - 2017-07-06 23:50 +0200
Re: [PATCH 14/21] x86/intel_rdt/cqm: Add mon_data Thomas Gleixner <tglx@linutronix.de> - 2017-07-07 08:30 +0200
Re: [PATCH 14/21] x86/intel_rdt/cqm: Add mon_data Shivappa Vikas <vikas.shivappa@intel.com> - 2017-07-11 23:20 +0200
Re: [PATCH 14/21] x86/intel_rdt/cqm: Add mon_data "Luck, Tony" <tony.luck@intel.com> - 2017-07-11 23:40 +0200
csiph-web