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

Re: [PATCH v2] mm/pdx: Add comments throughout the codebase for pdx


  • To: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 10 Jul 2023 18:32:24 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vmJE5VhmAD3QWhYPKSl6KezIAwPCVORINXgmdeRzYG8=; b=dzxpJSZCzWYYwZ2jDmHM1Gu9p2YM6FBc4+yQvKhBmtTy8Tds9CP56gqfBvrFiGyJ3IMMqovkBrL/VsF++AJQmg259UHiYdd1tT5k4vG0BIJI1MrE33Z3Q3D6/ScHHHcsAQPC1UIuGe+N3787Sc5rNVrqHxU8cd2/h4HXKAZA7HBC4kIl03vd7flGPhrVLl/8Rn66JEe5RZhGfdpj8pCe3p01jNCe1Xnqt+U9yRx5QmUHpdE2y8F661y6L9JEIWpf1zAPsn1C2vI6p24H4yGH+4GtMwSHpTNWGTgtbVo/bppTPY4/s0shQGiaxLDUyqXDrKdZeq0btC6V18+gxDWzNw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=REwBkaAuAmlh9Zxeiih8UVPbZ331zPoLWFYU5H972waroBsP+Yk6bLD9LfONEAnQjUVzELcBjOepjOx+bcEZztZm8Ef9iT1NA2l8B7TOinshh7+onZWHASmNhV5VO7GVrKAxoHJiJboxoM1rEXMRJtO3Q+J5ge2gE1AKv3TlO9hAqz90v4a9ECVqvdMVIWKEAB+f38J+UxXh5G8By6HaK/0JHp+GXI7NVcvLgLkiShxS8wKGzQWqGqLzdRsHTP/QgdiHdHfWbkmWf7oHKwZR11rOhvXVsIVUKUMIPUY64GRnmOQ6wu1Z++sH4E2xXmiHwGvIwSJ9ZdOFwG9u3rU7Bw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 10 Jul 2023 16:32:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.07.2023 18:12, Alejandro Vallejo wrote:
> On Mon, Jul 10, 2023 at 09:43:34AM +0200, Jan Beulich wrote:
>> This is ...
>>>>> [snip]
>>>>> + * This is where compression becomes useful. The idea is to note that if
>>>>> + * you have several big chunks of memory sufficiently far apart you can
>>>>> + * ignore the middle part of the address because it will always contain
>>>>> + * zeroes as long as the base address is sufficiently well aligned and 
>>>>> the
>>>>> + * length of the region is much smaller than the base address.
>>>>
>>>> As per above alignment of the base address doesn't really matter.
>>> Where above?
>>
>> ... what "above" here meant.
>>
>>> As far as I understand you need enough alignment to cover the
>>> hole or you won't have zeroes to compress. Point in case:
>>>
>>>   * region1: [0x0000000000000000 -
>>>               0x00000000FFFFFFFF]
>>>
>>>   * region2: [0x0001FFFFFFFFF000 -
>>>               0x00020000FFFFFFFF]
>>>
>>> I can agree this configuration is beyond dumb and statistically unlikely to
>>> exist in the wild, but it should (IMO) still be covered by that comment.
>>
>> Right, but this isn't relevant here - in such a case no compression
>> can occur, yes, but not (just) because of missing alignment. See the
>> example I gave above (in the earlier reply) for where alignment
>> clearly doesn't matter for compression to be possible.
>>
>> Jan
> Fair enough. Then I think we can simply drop the last sentence and be done
> with it.
> 
> So the paragraph becomes:
> ```
>    * This is where compression becomes useful. The idea is to note that if
>    * you have several big chunks of memory sufficiently far apart you can
>    * ignore the middle part of the address because it will always contain
>    * zeroes.
> ```
> The details on when or how compression is possible are implicit in the
> following example anyway.
> 
> Would that, combined with v3, take care of everything?

I'm yet to look at v3. Sorry, too many things going on / pending.

Jan



 


Rackspace

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