From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Cc: Tim Deegan <tim@xen.org>, Keir Fraser <keir@xen.org>,
Jan Beulich <JBeulich@suse.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2 2/8] x86: handle CQM resource when creating/destroying guests
Date: Mon, 25 Nov 2013 16:02:07 +0000 [thread overview]
Message-ID: <5293747F.1030701@citrix.com> (raw)
In-Reply-To: <40776A41FC278F40B59438AD47D147A9118BB2F0@SHSMSX104.ccr.corp.intel.com>
On 25/11/13 03:21, Xu, Dongxiao wrote:
>
>>> +
>>> + spin_lock_irqsave(&cqm_lock, flags);
>>> + /* We do not free system reserved "RMID=0" */
>>> + if ( rmid > 0 )
>>> + {
>>> + cqm_res_array[rmid].inuse = 0;
>>> + cqm_res_array[rmid].domain_id = 0;
>> Would DOMID_INVALID be more appropriate here? 0 is valid domain
>> identifier. It would also mean that you could remove the inuse flag
>> from the structure, and the structure itself degrades to an array of
>> domid_t's
>>
>> You can then further use cmpxchg() and avoid the spinlock.
>>
>> I guess this all depends on whether you are expecting to add new
>> information into the structure or not.
> Per my understanding, DOMID_xxx is somewhat related with memory management, e.g., DOMID_INVALID is used to identify pages with unknown owner. Is it appropriate to use it in CQM feature?
>
> According to your proposal:
> - DOMID_INVALID is for RMIDs that are not allocated yet;
> - A valid domain number stands for the RMID is used for a certain domain;
> - Maybe DOMID_SELF or DOMID_XEN for the system reserved RMID=0?
>
> Do you think it is OK if we introduce extra meanings (CQM specific) for those macros?
CC'ing the relevant maintainers for their opinion.
I would suggest that DOMID_INVALID should have its formal meaning
expanded to any case where there can logically be a domid needing a
specific invalid state.
~Andrew
next prev parent reply other threads:[~2013-11-25 16:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 7:20 [PATCH v2 0/8] enable Cache QoS Monitoring (CQM) feature dongxiao.xu
2013-11-21 7:20 ` [PATCH v2 1/8] x86: detect and initialize Cache QoS Monitoring feature dongxiao.xu
2013-11-21 12:14 ` Andrew Cooper
2013-11-21 12:19 ` Andrew Cooper
2013-11-25 3:06 ` Xu, Dongxiao
2013-11-25 15:40 ` Andrew Cooper
2013-11-25 8:57 ` Xu, Dongxiao
2013-11-25 15:58 ` Andrew Cooper
2013-11-21 7:20 ` [PATCH v2 2/8] x86: handle CQM resource when creating/destroying guests dongxiao.xu
2013-11-21 12:33 ` Andrew Cooper
2013-11-25 3:21 ` Xu, Dongxiao
2013-11-25 16:02 ` Andrew Cooper [this message]
2013-11-21 7:20 ` [PATCH v2 3/8] tools: " dongxiao.xu
2013-11-21 7:20 ` [PATCH v2 4/8] x86: dynamically attach/detach CQM service for a guest dongxiao.xu
2013-11-21 12:50 ` Andrew Cooper
2013-11-25 3:26 ` Xu, Dongxiao
2013-11-25 16:05 ` Andrew Cooper
2013-11-25 21:06 ` Konrad Rzeszutek Wilk
2013-11-21 7:20 ` [PATCH v2 5/8] tools: " dongxiao.xu
2013-11-25 21:00 ` Konrad Rzeszutek Wilk
2013-11-25 21:01 ` Konrad Rzeszutek Wilk
2013-11-21 7:20 ` [PATCH v2 6/8] x86: get per domain CQM information dongxiao.xu
2013-11-21 14:09 ` Andrew Cooper
2013-11-25 6:20 ` Xu, Dongxiao
2013-11-25 16:28 ` Andrew Cooper
2013-11-21 7:20 ` [PATCH v2 7/8] tools: " dongxiao.xu
2013-11-21 7:20 ` [PATCH v2 8/8] x86: enable CQM monitoring for each domain RMID dongxiao.xu
2013-11-21 14:19 ` Andrew Cooper
2013-11-25 7:22 ` Xu, Dongxiao
2013-11-25 16:32 ` Andrew Cooper
2013-11-21 14:36 ` [PATCH v2 0/8] enable Cache QoS Monitoring (CQM) feature Andrew Cooper
2013-11-25 7:24 ` Xu, Dongxiao
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=5293747F.1030701@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=dongxiao.xu@intel.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/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.