[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 1/2] xen/link: Introduce .bss.percpu.page_aligned


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Tue, 30 Jul 2019 09:49:38 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7XDLqKgK3TBnmiDmgtdc9cDFf0qIuMw7IXQJrYH/268=; b=KmG26AUU7nJSCbBUFGDBzD7+aB2ve9iPF+MkpJRNdLGcVttgf/KYt+AKvTmHfkBLQV4WUWxnj0uy9I+l/0500Q9I70vFl6dki6lkKaEFWcUVG3+AkfMJUDsWL41h2RMD7yPcZZbCAagy+7YOkYKWfWjzgL2bb8/FroHoeqf7N7EB2fCYPUmt8uyEk1yz6OyX7mwM3GfVA2bEcFhHKw5c7nOUB4YmCjhBirCZir49IdQm3QS4ZCKLsfOPPHsKfVsGjQWxOx6qrt6L5MqoNUB4M0sIpD514fSY3YZ5AVKYydX+RUtzYal2DX3tOTDrNFa3XBoEibWGttWY6L6jl1UEgg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kw0p97jc03fYAhN7XOSKm93HJcN+F3Ct119eFfXbUhQTgpbEw96LQVLRuv/Y8lxlmn3awJ8rYk5eRr51lSNkx0IreqS377NmPp3sHaqqJha3qMsn3EtV6z4Hn9HHyqz2ZzgAmkcxPNhqtpjUQ3kl4lAVtWL97zFWWZMbuA/dz9Op0y/HH0YSyrOMKqu/Nvkcz8BB8GBbFE7jkaebqkEaVfhMR1rf42FXoNgrsaFDfIZACGLVsNGLFRI1tMiOLJrvYAXMSlw+2o7vZtS1PHP1uc/FESjpR+O9dpvNnEHnnHCmlsL9q1QLTFcfYeE8OBv4FTDjLy4ZlZ+zus9aeR2Xhg==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: StefanoStabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 30 Jul 2019 09:56:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVRjSGjfvYvY8Mj0+dnjT7dlU+s6bi2QqAgAAPEuOAAAOnAA==
  • Thread-topic: [PATCH v3 1/2] xen/link: Introduce .bss.percpu.page_aligned

On 30.07.2019 11:35, Andrew Cooper wrote:
> On 30/07/2019 09:42, Jan Beulich wrote:
>> On 29.07.2019 19:38, Andrew Cooper wrote:
>>> --- a/xen/arch/x86/xen.lds.S
>>> +++ b/xen/arch/x86/xen.lds.S
>>> @@ -293,14 +293,17 @@ SECTIONS
>>>          __bss_start = .;
>>>          *(.bss.stack_aligned)
>>>          *(.bss.page_aligned*)
>>> -       *(.bss)
>>> -       . = ALIGN(SMP_CACHE_BYTES);
>>> +       . = ALIGN(PAGE_SIZE);
>>>          __per_cpu_start = .;
>>> +       *(.bss.percpu.page_aligned)
>>> +       . = ALIGN(PAGE_SIZE);
>> But this goes too far: What we want is for the TSS to occupy a full
>> page, not for whatever random other page-aligned object ends up
>> last here (should any every appear).
> 
> Come again?  This is ridiculous.
> 
> Objects in a section following foo.page_aligned should never end up in
> the tail of the final page of foo.page_aligned, because then they are in
> the wrong section.

How do you derive "wrong section"? Sections have an alignment and a
size. The latter doesn't need to be a multiple of the former. The
section ends wherever its size says it ends. Using this property is
actually desirable in other cases, to limit waste of space.

> A short TSS is a pain to deal with, but even you said you didn't like
> the xen_tss idea when you suggested it.
> 
> The name of the section is very deliberately not TSS specific, because
> there is plenty of other cleanup which will end up with objects in this
> section.

Well, if they're all strictly a multiple of PAGE_SIZE, then writing
down a respective requirement might be acceptable. But even then I
wouldn't be overly happy going that route.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.