All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: David Vrabel <david.vrabel@citrix.com>,
	Jan Beulich <JBeulich@suse.com>,
	Julien Grall <julien.grall@citrix.com>
Cc: xen-devel@lists.xenproject.org, Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCHv2 5/5] evtchn: pad struct evtchn to 64 bytes
Date: Tue, 16 Jun 2015 14:27:24 +0100	[thread overview]
Message-ID: <5580243C.2040904@citrix.com> (raw)
In-Reply-To: <558020E5.7050707@citrix.com>

On 16/06/15 14:13, David Vrabel wrote:
> On 16/06/15 13:57, Julien Grall wrote:
>> On 16/06/15 12:59, Jan Beulich wrote:
>>>>>> On 16.06.15 at 13:14, <julien.grall@citrix.com> wrote:
>>>> On 15/06/2015 16:48, David Vrabel wrote:
>>>>> diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h
>>>>> index 44ea92d..a0ff9d2 100644
>>>>> --- a/xen/include/xen/sched.h
>>>>> +++ b/xen/include/xen/sched.h
>>>>> @@ -129,7 +129,7 @@ struct evtchn
>>>>>   #endif
>>>>>       } ssid;
>>>>>   #endif
>>>>> -};
>>>>> +} __attribute__((aligned(64)));
>>>>
>>>> Why don't you use __cacheline_aligned?
>>>
>>> That would double the size on x86, for little or no benefit.
>>
>> Well, the cache line size is not necessarily 64 bytes on every
>> architecture. In the case of ARM, the cache line depends on the
>> processor version.
>>
>> __cacheline_aligned is the only way to ensure that the cache line is not
>> shared on ARM.
>>
>> AFAIU, the goal of this patch is to avoid sharing the cache line. If
>> not, the commit message is misleading because it claims that a cache
>> line is always 64 bytes...
> 
> We want to avoid sharing the cache line where we can do so for no
> additional memory cost.

I would expand the commit message to make clear that we may not share
the cache line. The "64 bytes (cache line)" is confusing and without any
background it can be interpreted wrongly.

Regards,

-- 
Julien Grall

      reply	other threads:[~2015-06-16 13:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 15:48 [PATCHv2 0/5] evtchn: Improve scalebility David Vrabel
2015-06-15 15:48 ` [PATCHv2 1/5] evtchn: factor out freeing an event channel David Vrabel
2015-06-15 15:48 ` [PATCHv2 2/5] evtchn: simplify port_is_valid() David Vrabel
2015-06-15 15:57   ` Ian Campbell
2015-06-15 15:59     ` David Vrabel
2015-06-15 16:09       ` Ian Campbell
2015-06-15 15:48 ` [PATCHv2 3/5] evtchn: use a per-event channel lock for sending events David Vrabel
2015-06-16  9:18   ` Jan Beulich
2015-06-16  9:34     ` David Vrabel
2015-06-16  9:51       ` Jan Beulich
2015-06-16  9:57         ` David Vrabel
2015-06-16 15:19     ` David Vrabel
2015-06-16 15:58       ` David Vrabel
2015-06-16 16:19         ` Jan Beulich
2015-06-16 16:39           ` David Vrabel
2015-06-17  7:05             ` Jan Beulich
2015-06-16 16:06       ` Jan Beulich
2015-06-15 15:48 ` [PATCHv2 4/5] evtchn: remove the locking when unmasking an event channel David Vrabel
2015-06-16  9:19   ` Jan Beulich
2015-06-16  9:40     ` David Vrabel
2015-06-15 15:48 ` [PATCHv2 5/5] evtchn: pad struct evtchn to 64 bytes David Vrabel
2015-06-16  9:22   ` Jan Beulich
2015-06-16 11:14   ` Julien Grall
2015-06-16 11:59     ` Jan Beulich
2015-06-16 12:57       ` Julien Grall
2015-06-16 13:13         ` David Vrabel
2015-06-16 13:27           ` Julien Grall [this message]

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=5580243C.2040904@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=david.vrabel@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.