Re: [PATCH] mm: extend zero pages to same element pages for zram

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

 



On (01/23/17 11:58), Joonsoo Kim wrote:
> Hello,
> 
> On Sun, Jan 22, 2017 at 10:58:38AM +0800, zhouxianrong wrote:
> > 1. memset is just set a int value but i want to set a long value.
> 
> Sorry for late review.
> 
> Do we really need to set a long value? I cannot believe that
> long value is repeated in the page. Value repeatition is
> usually done by value 0 or 1 and it's enough to use int. And, I heard
> that value 0 or 1 is repeated in Android. Could you check the distribution
> of the value in the same page?

Hello Joonsoo,

thanks for taking a look and for bringing this question up.
so I kinda wanted to propose union of `ulong handle' with `uint element'
and switching to memset(), but I couldn't figure out if that change would
break detection of some patterns.

 /* Allocated for each disk page */
 struct zram_table_entry {
-       unsigned long handle;
+       union {
+               unsigned long handle;
+               unsigned int element;
+       };
        unsigned long value;
 };

	-ss

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux