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

Re: [PATCH 04/12] swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 15 Sep 2021 10:21:51 +0200
  • 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; bh=UobxhOwENG75OeE9t5Q7pyFYU1cTvsFYR6nUP5ypraQ=; b=oT48ao4h7wcOiqJhWzurR70L79Js49e4CPl+E+U982MsL3/yUrx/C/gx2MC1+Xpw7l2sZSwKY77V9UKnuWWoHXRDk9rjh7wfgdkgvW6ao27J7cU9X7OlMteTNyeqYRIK1Uk5T0L1aIhGYGvDgreB8+vJ780UOmKJSSTVDXUL9iH5TzpAGqZ1TlTnpaU6IScrJ3RAClE3mggUuPI39z9AFD3RZgbxtd34K6C86V4kJZAAwdWNkC+pome/9Zt3pQLPL7BfexocYG6Q2F7c7g2pTibYTjn7kH5jLRn8UJ08n4bloHsJTQHIo2dJItopesAsITujZSVAesbvefVBkpA5xA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JtplVii/RcT+W/ApW5sjDYxxShFu3TAjpZiHxikgWQQjTGRndryFI0lqX6NM5HybbcH2B02q9SlvFbwMwRLvy5GxcnSWsjQ0gsfaJ5R3AhGKVoNggCfjUe57hGjTGPg13/ZFu4L9wby34Muu2KznqGJ74VM7IFk+yxx7QiNTpBm66cUtLGFiD3Lhmh/SDEqxPr/ejzNfa0j7AMUFWfwvGt0sYhDb09HNSwFSAI5Z6/dZywQ1R8WkFUdch7Kl82uioTZi6nCfu9Yd0c3C3HkylNX3kZGwA2tEI6RnBLEMtk1nqLkf4fWJvROFU1ZDI3jizVuaAjm4smCuNCaKje4kTg==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 15 Sep 2021 08:22:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.09.2021 03:54, Stefano Stabellini wrote:
> On Tue, 14 Sep 2021, Stefano Stabellini wrote:
>> On Tue, 14 Sep 2021, Jan Beulich wrote:
>>> On 13.09.2021 22:31, Stefano Stabellini wrote:
>>>> On Mon, 13 Sep 2021, Jan Beulich wrote:
>>>>> On 11.09.2021 01:14, Stefano Stabellini wrote:
>>>>>> On Tue, 7 Sep 2021, Jan Beulich wrote:
>>>>>>> While the hypervisor hasn't been enforcing this, we would still better
>>>>>>> avoid issuing requests with GFNs not aligned to the requested order.
>>>>>>>
>>>>>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>>>>> ---
>>>>>>> I wonder how useful it is to include the alignment in the panic()
>>>>>>> message.
>>>>>>
>>>>>> Not very useful given that it is static. I don't mind either way but you
>>>>>> can go ahead and remove it if you prefer (and it would make the line
>>>>>> shorter.)
>>>>>>
>>>>>>
>>>>>>> I further wonder how useful it is to wrap "bytes" in
>>>>>>> PAGE_ALIGN(), when it is a multiple of a segment's size anyway (or at
>>>>>>> least was supposed to be, prior to "swiotlb-xen: maintain slab count
>>>>>>> properly").
>>>>>>
>>>>>> This one I would keep, to make sure to print out the same amount passed
>>>>>> to memblock_alloc.
>>>>>
>>>>> Oh - if I was to drop it from the printk(), I would have been meaning to
>>>>> also drop it there. If it's useless, then it's useless everywhere.
>>>>
>>>> That's fine too
>>>
>>> Thanks, I'll see about dropping that then.
>>>
>>> Another Arm-related question has occurred to me: Do you actually
>>> mind the higher-than-necessary alignment there? If so, a per-arch
>>> definition of the needed alignment would need introducing. Maybe
>>> that could default to PAGE_SIZE, allowing Arm and alike to get away
>>> without explicitly specifying a value ...
>>
>> Certainly a patch like that could be good. Given that it is only one
>> allocation I was assuming that the higher-than-necessary alignment
>> wouldn't be a problem worth addressing (and I cannot completely rule out
>> that one day we might have to use XENMEM_exchange on ARM too).
> 
> Also this code is currently #ifdef CONFIG_X86

Oh, good point. When writing the patch I did take this into consideration,
but I had managed to forget that aspect in the meantime. No adjustment to
this effect needed then.

Jan




 


Rackspace

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