* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-07 7:04 Minchan Kim
@ 2013-11-07 17:06 ` Luigi Semenzato
2013-11-07 17:36 ` Luigi Semenzato
2013-11-08 2:02 ` Greg KH
2013-11-07 17:10 ` Rik van Riel
` (2 subsequent siblings)
3 siblings, 2 replies; 25+ messages in thread
From: Luigi Semenzato @ 2013-11-07 17:06 UTC (permalink / raw)
To: Minchan Kim
Cc: Greg KH, Nitin Gupta, Seth Jennings, lliubbo, jmarchan,
Mel Gorman, Rik van Riel, Hugh Dickins, Andrew Morton, linux-mm,
linux-kernel
If I may add my usual 2c (and some news):
zram is used by default on all Chrome OS devices. I can't say how
many devices, but it's not a small number, google it, and it's an
important market, low-end laptops for education and the less affluent.
It has been available experimentally for well over a year.
Android 4.4 KitKat is also using zram, to better support devices with
less than 1 MB RAM. (That's the news.)
When comparing the relative advantages of the two subsystems (zram and
zswap), let's not forget that considerable effort goes into in tuning
and bug fixing for specific use cases---possibly even more than the
initial development effort. Zram has not just been sitting around in
drivers/staging, it's in serious use.
If we were to judge systems based merely on theoretical technical
merit, then we should consider switching en masse to FreeBSD. (I said
we should *consider* :).
I am very familiar with the limitations of zram, but it works well and
I think it would be wise to keep supporting it. Besides, it's small
and AFAICT it interfaces cleanly with the rest of the system, so I
don't see what the big deal is.
Thanks!
On Wed, Nov 6, 2013 at 11:04 PM, Minchan Kim <minchan@kernel.org> wrote:
> On Wed, Nov 06, 2013 at 07:05:11PM -0800, Greg KH wrote:
>> On Wed, Nov 06, 2013 at 03:46:19PM -0800, Nitin Gupta wrote:
>> > I'm getting really tired of them hanging around in here for many years
>> > > now...
>> > >
>> >
>> > Minchan has tried many times to promote zram out of staging. This was
>> > his most recent attempt:
>> >
>> > https://lkml.org/lkml/2013/8/21/54
>> >
>> > There he provided arguments for zram inclusion, how it can help in
>> > situations where zswap can't and why generalizing /dev/ramX would
>> > not be a great idea. So, cannot say why it wasn't picked up
>> > for inclusion at that time.
>> >
>> > > Should I just remove them if no one is working on getting them merged
>> > > "properly"?
>> > >
>> >
>> > Please refer the mail thread (link above) and see Minchan's
>> > justifications for zram.
>> > If they don't sound convincing enough then please remove zram+zsmalloc
>> > from staging.
>>
>> You don't need to be convincing me, you need to be convincing the
>> maintainers of the area of the kernel you are working with.
>>
>> And since the last time you all tried to get this merged was back in
>> August, I'm feeling that you all have given up, so it needs to be
>> deleted. I'll go do that for 3.14, and if someone wants to pick it up
>> and merge it properly, they can easily revert it.
>
> I'm guilty and I have been busy by other stuff. Sorry for that.
> Fortunately, I discussed this issue with Hugh in this Linuxcon for a
> long time(Thanks Hugh!) he felt zram's block device abstraction is
> better design rather than frontswap backend stuff although it's a question
> where we put zsmalloc. I will CC Hugh because many of things is related
> to swap subsystem and his opinion is really important.
> And I discussed it with Rik and he feel positive about zram.
>
> Last impression Andrw gave me by private mail is he want to merge
> zram's functionality into zswap or vise versa.
> If I misunderstood, please correct me.
> I understand his concern but I guess he didn't have a time to read
> my long description due to a ton of works at that time.
> So, I will try one more time.
> I hope I'd like to listen feedback than *silence* so that we can
> move forward than stall.
>
> Recently, Bob tried to move zsmalloc under mm directory to unify
> zram and zswap with adding pseudo block device in zswap(It's
> very weired to me. I think it's horrible monster which is lying
> between mm and block in layering POV) but he was ignoring zram's
> block device (a.k.a zram-blk) feature and considered only swap
> usecase of zram, in turn, it lose zram's good concept.
> I already convered other topics Bob raised in this thread[1]
> and why I think zram is better in the thread.
>
> Will repeat one more time and hope gray beards penguins grab a
> time in this time and they give a conclusion/direction to me so
> that we don't lose lots of user and functionality.
>
> ========== &< ===========
>
> Mel raised an another issue in v6, "maintainance headache".
> He claimed zswap and zram has a similar goal that is to compresss
> swap pages so if we promote zram, maintainance headache happens
> sometime by diverging implementaion between zswap and zram
> so that he want to unify zram and zswap. For it, he want zswap
> to implement pseudo block device like Bob did to emulate zram so
> zswap can have an advantage of writeback as well as zram's benefit.
> But I wonder frontswap-based zswap's writeback is really good
> approach for writeback POV. I think that problem isn't only
> specific for zswap. If we want to configure multiple swap hierarchy
> with various speed device such as RAM, NVRAM, SSD, eMMC, NAS etc,
> it would be a general problem. So we should think of more general
> approach. At a glance, I can see two approach.
>
> First, VM could be aware of heterogeneous swap configuration
> so it could aim for being able to configure cache hierarchy
> among swap devices. It may need indirction layer on swap, which
> was already talked about that way so VM can migrate a block from
> A to B easily. It will support various configuration with VM's
> hints, maybe, in future.
> http://lkml.indiana.edu/hypermail/linux/kernel/1203.3/03812.html
>
> Second, as more practical solution, we could use device mapper like
> dm-cache(https://lwn.net/Articles/540996/), which makes it very
> flexible. Now, it supports various configruation and cache policy
> (block size, writeback/writethrough, LRU, MFU although MQ is merged
> now) so it would be good fit for our purpose. Even, it can make zram
> support writeback. I tested it following as following scenario
> in KVM 4 CPU, 1G DRAM with background 800M memory hogger, which is
> allocates random data up to 800M.
>
> 1) zram swap disk 1G, untar kernel.tgz to tmpfs, build -j 4
> Fail to untar due to shortage of memory space by tmpfs default size limit
>
> 2) zram swap disk 1G, untar kernel.tgz to ext2 on zram-blk, build -j 4
> OOM happens while building the kernel but it untar successfully
> on ext2 based on zram-blk. The reason OOM happend is zram can not find
> free pages from main memory to store swap out pages although empty
> swap space is still enough.
>
> 3) dm-cache swap disk 1G, untar kernel.tgz to ext2 on zram-blk, build -j 4
> dmcache consists of zram-meta 10M, zram-cache 1G and real swap storage 1G
> No OOM happens and successfully building done.
>
> Above tests proves zram can support writeback into real swap storage
> so that zram-cache can always have a free space. If necessary, we could
> add new plugin in dm-cache. I see It's really flexible and well-layered
> architecure so zram-blk's concept is good for us and it has lots of
> potential to be enhanced by MM/FS/Block developers.
>
> As other disadvantage of zswap writeback, frontswap's semantic is
> synchronous API so zswap should decompress in memory zpage
> right before writeback and even, it writes pages one by one,
> not a batch. If we extend frontswap API, we would enhance it but
> I belive we can do better in device mapper layer which is aware of
> block align, bandwidth, mapping table, asynchronous and lots of hints
> from the block layer. Nonetheless, if we should merge zram's
> functionality to zswap, I think zram should include zswap's
> functionaliy(But I hope it will never happen) because old age zram
> already has lots of real users rather than new young zswap so it's
> more handy to unify them with keeping changelog which is one of
> valuable things getting from staging stay for a long time.
>
> The reason zram doesn't support writeback until now is just shortage
> of needs. The zram's main customers were embedded people so writeback
> into real swap storage is too bad for interactivity and wear-leveling
> on low falsh devices. But like above, zram has a potential to support
> writeback with other block drivers or more reasonable VM enhance
> so I'd like to claim zram's block concept is really good.
>
> Another zram-blk's usecase is following as.
> The admin can format /dev/zramX with any FS and mount on it.
> It could help small memory system, too. For exmaple, many embedded
> system don't have swap so although tmpfs can support swapout,
> it's pointless. Then, let's assume temp file growing up until half
> of system memory once in a while. We don't want to write it on flash
> by wear-leveing issue and response problem so we want to keep in-memory.
> But if we use tmpfs, it should evict half of working set to cover them
> when the size reach peak. In the case, zram-blk would be good fit, too.
>
> I'd like to enhance zram with more features like zsmalloc-compaction,
> , async I/O, parallel decompression and so on but zram developers cannot
> do it now because Greg, staging maintainer, doesn't want to add new feature
> until promotion is done because zram have been in staging for a very long time.
> Acutally, some patches about enhance are pending for a long time.
>
> [1] https://lkml.org/lkml/2013/8/21/141
>
>>
>> thanks,
>>
>> greg k-h
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
> --
> Kind regards,
> Minchan Kim
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-07 17:06 ` Luigi Semenzato
@ 2013-11-07 17:36 ` Luigi Semenzato
2013-11-08 2:02 ` Greg KH
1 sibling, 0 replies; 25+ messages in thread
From: Luigi Semenzato @ 2013-11-07 17:36 UTC (permalink / raw)
To: Minchan Kim
Cc: Greg KH, Nitin Gupta, Seth Jennings, lliubbo, jmarchan,
Mel Gorman, Rik van Riel, Hugh Dickins, Andrew Morton, linux-mm,
linux-kernel
On Thu, Nov 7, 2013 at 9:06 AM, Luigi Semenzato <semenzato@google.com> wrote:
-> Android 4.4 KitKat is also using zram, to better support devices with
-> less than 1 MB RAM. (That's the news.)
Sorry, I meant 1 GB RAM.
http://dilbert.com/strips/comic/1991-09-27/
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-07 17:06 ` Luigi Semenzato
2013-11-07 17:36 ` Luigi Semenzato
@ 2013-11-08 2:02 ` Greg KH
1 sibling, 0 replies; 25+ messages in thread
From: Greg KH @ 2013-11-08 2:02 UTC (permalink / raw)
To: Luigi Semenzato
Cc: Minchan Kim, Nitin Gupta, Seth Jennings, lliubbo, jmarchan,
Mel Gorman, Rik van Riel, Hugh Dickins, Andrew Morton, linux-mm,
linux-kernel
On Thu, Nov 07, 2013 at 09:06:26AM -0800, Luigi Semenzato wrote:
> If I may add my usual 2c (and some news):
>
> zram is used by default on all Chrome OS devices. I can't say how
> many devices, but it's not a small number, google it, and it's an
> important market, low-end laptops for education and the less affluent.
> It has been available experimentally for well over a year.
>
> Android 4.4 KitKat is also using zram, to better support devices with
> less than 1 MB RAM. (That's the news.)
>
> When comparing the relative advantages of the two subsystems (zram and
> zswap), let's not forget that considerable effort goes into in tuning
> and bug fixing for specific use cases---possibly even more than the
> initial development effort. Zram has not just been sitting around in
> drivers/staging, it's in serious use.
>
> If we were to judge systems based merely on theoretical technical
> merit, then we should consider switching en masse to FreeBSD. (I said
> we should *consider* :).
>
> I am very familiar with the limitations of zram, but it works well and
> I think it would be wise to keep supporting it. Besides, it's small
> and AFAICT it interfaces cleanly with the rest of the system, so I
> don't see what the big deal is.
Then please help with getting it merged properly, and out of staging.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-07 7:04 Minchan Kim
2013-11-07 17:06 ` Luigi Semenzato
@ 2013-11-07 17:10 ` Rik van Riel
2013-11-08 10:44 ` Bob Liu
2013-11-12 15:41 ` Minchan Kim
3 siblings, 0 replies; 25+ messages in thread
From: Rik van Riel @ 2013-11-07 17:10 UTC (permalink / raw)
To: Minchan Kim
Cc: Greg KH, Nitin Gupta, Seth Jennings, lliubbo, jmarchan, mgorman,
hughd, akpm, linux-mm, linux-kernel
On 11/07/2013 02:04 AM, Minchan Kim wrote:
> I'm guilty and I have been busy by other stuff. Sorry for that.
> Fortunately, I discussed this issue with Hugh in this Linuxcon for a
> long time(Thanks Hugh!) he felt zram's block device abstraction is
> better design rather than frontswap backend stuff although it's a question
> where we put zsmalloc. I will CC Hugh because many of things is related
> to swap subsystem and his opinion is really important.
> And I discussed it with Rik and he feel positive about zram.
To clarify that, I agree with Minchan that there are certain
workloads where zram is probably more appropriate than zswap.
For most of the workloads that I am interested in, zswap will
be more interesting, but zram seems to have its own niche, and
I certainly do not want to hold back the embedded folks...
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-07 7:04 Minchan Kim
2013-11-07 17:06 ` Luigi Semenzato
2013-11-07 17:10 ` Rik van Riel
@ 2013-11-08 10:44 ` Bob Liu
2013-11-12 15:41 ` Minchan Kim
3 siblings, 0 replies; 25+ messages in thread
From: Bob Liu @ 2013-11-08 10:44 UTC (permalink / raw)
To: Minchan Kim
Cc: Greg KH, Nitin Gupta, Seth Jennings, lliubbo, jmarchan, mgorman,
riel, hughd, akpm, linux-mm, linux-kernel
On 11/07/2013 03:04 PM, Minchan Kim wrote:
> On Wed, Nov 06, 2013 at 07:05:11PM -0800, Greg KH wrote:
>> On Wed, Nov 06, 2013 at 03:46:19PM -0800, Nitin Gupta wrote:
>> > I'm getting really tired of them hanging around in here for many years
>>>> now...
>>>>
>>>
>>> Minchan has tried many times to promote zram out of staging. This was
>>> his most recent attempt:
>>>
>>> https://lkml.org/lkml/2013/8/21/54
>>>
>>> There he provided arguments for zram inclusion, how it can help in
>>> situations where zswap can't and why generalizing /dev/ramX would
>>> not be a great idea. So, cannot say why it wasn't picked up
>>> for inclusion at that time.
>>>
>>>> Should I just remove them if no one is working on getting them merged
>>>> "properly"?
>>>>
>>>
>>> Please refer the mail thread (link above) and see Minchan's
>>> justifications for zram.
>>> If they don't sound convincing enough then please remove zram+zsmalloc
>>> from staging.
>>
>> You don't need to be convincing me, you need to be convincing the
>> maintainers of the area of the kernel you are working with.
>>
>> And since the last time you all tried to get this merged was back in
>> August, I'm feeling that you all have given up, so it needs to be
>> deleted. I'll go do that for 3.14, and if someone wants to pick it up
>> and merge it properly, they can easily revert it.
>
> I'm guilty and I have been busy by other stuff. Sorry for that.
> Fortunately, I discussed this issue with Hugh in this Linuxcon for a
> long time(Thanks Hugh!) he felt zram's block device abstraction is
> better design rather than frontswap backend stuff although it's a question
> where we put zsmalloc. I will CC Hugh because many of things is related
> to swap subsystem and his opinion is really important.
> And I discussed it with Rik and he feel positive about zram.
>
> Last impression Andrw gave me by private mail is he want to merge
> zram's functionality into zswap or vise versa.
> If I misunderstood, please correct me.
> I understand his concern but I guess he didn't have a time to read
> my long description due to a ton of works at that time.
> So, I will try one more time.
> I hope I'd like to listen feedback than *silence* so that we can
> move forward than stall.
>
> Recently, Bob tried to move zsmalloc under mm directory to unify
> zram and zswap with adding pseudo block device in zswap(It's
> very weired to me. I think it's horrible monster which is lying
> between mm and block in layering POV) but he was ignoring zram's
> block device (a.k.a zram-blk) feature and considered only swap
> usecase of zram, in turn, it lose zram's good concept.
> I already convered other topics Bob raised in this thread[1]
> and why I think zram is better in the thread.
>
I have no objections for zram, and I also think is good for zswap can
support zsmalloc and fake swap device. At least users can have more
options just like slab/slub/slob.
--
Regards,
-Bob
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-07 7:04 Minchan Kim
` (2 preceding siblings ...)
2013-11-08 10:44 ` Bob Liu
@ 2013-11-12 15:41 ` Minchan Kim
2013-11-13 2:42 ` Greg KH
2013-11-14 4:00 ` Hugh Dickins
3 siblings, 2 replies; 25+ messages in thread
From: Minchan Kim @ 2013-11-12 15:41 UTC (permalink / raw)
To: Greg KH, Andrew Morton
Cc: Nitin Gupta, Seth Jennings, lliubbo, jmarchan, mgorman, riel,
hughd, akpm, linux-mm, linux-kernel, Luigi Semenzato
On Thu, Nov 07, 2013 at 04:04:51PM +0900, Minchan Kim wrote:
> On Wed, Nov 06, 2013 at 07:05:11PM -0800, Greg KH wrote:
> > On Wed, Nov 06, 2013 at 03:46:19PM -0800, Nitin Gupta wrote:
> > > I'm getting really tired of them hanging around in here for many years
> > > > now...
> > > >
> > >
> > > Minchan has tried many times to promote zram out of staging. This was
> > > his most recent attempt:
> > >
> > > https://lkml.org/lkml/2013/8/21/54
> > >
> > > There he provided arguments for zram inclusion, how it can help in
> > > situations where zswap can't and why generalizing /dev/ramX would
> > > not be a great idea. So, cannot say why it wasn't picked up
> > > for inclusion at that time.
> > >
> > > > Should I just remove them if no one is working on getting them merged
> > > > "properly"?
> > > >
> > >
> > > Please refer the mail thread (link above) and see Minchan's
> > > justifications for zram.
> > > If they don't sound convincing enough then please remove zram+zsmalloc
> > > from staging.
> >
> > You don't need to be convincing me, you need to be convincing the
> > maintainers of the area of the kernel you are working with.
> >
> > And since the last time you all tried to get this merged was back in
> > August, I'm feeling that you all have given up, so it needs to be
> > deleted. I'll go do that for 3.14, and if someone wants to pick it up
> > and merge it properly, they can easily revert it.
>
> I'm guilty and I have been busy by other stuff. Sorry for that.
> Fortunately, I discussed this issue with Hugh in this Linuxcon for a
> long time(Thanks Hugh!) he felt zram's block device abstraction is
> better design rather than frontswap backend stuff although it's a question
> where we put zsmalloc. I will CC Hugh because many of things is related
> to swap subsystem and his opinion is really important.
> And I discussed it with Rik and he feel positive about zram.
>
> Last impression Andrw gave me by private mail is he want to merge
> zram's functionality into zswap or vise versa.
> If I misunderstood, please correct me.
> I understand his concern but I guess he didn't have a time to read
> my long description due to a ton of works at that time.
> So, I will try one more time.
> I hope I'd like to listen feedback than *silence* so that we can
> move forward than stall.
>
> Recently, Bob tried to move zsmalloc under mm directory to unify
> zram and zswap with adding pseudo block device in zswap(It's
> very weired to me. I think it's horrible monster which is lying
> between mm and block in layering POV) but he was ignoring zram's
> block device (a.k.a zram-blk) feature and considered only swap
> usecase of zram, in turn, it lose zram's good concept.
> I already convered other topics Bob raised in this thread[1]
> and why I think zram is better in the thread.
>
> Will repeat one more time and hope gray beards penguins grab a
> time in this time and they give a conclusion/direction to me so
> that we don't lose lots of user and functionality.
>
> ========== &< ===========
>
> Mel raised an another issue in v6, "maintainance headache".
> He claimed zswap and zram has a similar goal that is to compresss
> swap pages so if we promote zram, maintainance headache happens
> sometime by diverging implementaion between zswap and zram
> so that he want to unify zram and zswap. For it, he want zswap
> to implement pseudo block device like Bob did to emulate zram so
> zswap can have an advantage of writeback as well as zram's benefit.
> But I wonder frontswap-based zswap's writeback is really good
> approach for writeback POV. I think that problem isn't only
> specific for zswap. If we want to configure multiple swap hierarchy
> with various speed device such as RAM, NVRAM, SSD, eMMC, NAS etc,
> it would be a general problem. So we should think of more general
> approach. At a glance, I can see two approach.
>
> First, VM could be aware of heterogeneous swap configuration
> so it could aim for being able to configure cache hierarchy
> among swap devices. It may need indirction layer on swap, which
> was already talked about that way so VM can migrate a block from
> A to B easily. It will support various configuration with VM's
> hints, maybe, in future.
> http://lkml.indiana.edu/hypermail/linux/kernel/1203.3/03812.html
>
> Second, as more practical solution, we could use device mapper like
> dm-cache(https://lwn.net/Articles/540996/), which makes it very
> flexible. Now, it supports various configruation and cache policy
> (block size, writeback/writethrough, LRU, MFU although MQ is merged
> now) so it would be good fit for our purpose. Even, it can make zram
> support writeback. I tested it following as following scenario
> in KVM 4 CPU, 1G DRAM with background 800M memory hogger, which is
> allocates random data up to 800M.
>
> 1) zram swap disk 1G, untar kernel.tgz to tmpfs, build -j 4
> Fail to untar due to shortage of memory space by tmpfs default size limit
>
> 2) zram swap disk 1G, untar kernel.tgz to ext2 on zram-blk, build -j 4
> OOM happens while building the kernel but it untar successfully
> on ext2 based on zram-blk. The reason OOM happend is zram can not find
> free pages from main memory to store swap out pages although empty
> swap space is still enough.
>
> 3) dm-cache swap disk 1G, untar kernel.tgz to ext2 on zram-blk, build -j 4
> dmcache consists of zram-meta 10M, zram-cache 1G and real swap storage 1G
> No OOM happens and successfully building done.
>
> Above tests proves zram can support writeback into real swap storage
> so that zram-cache can always have a free space. If necessary, we could
> add new plugin in dm-cache. I see It's really flexible and well-layered
> architecure so zram-blk's concept is good for us and it has lots of
> potential to be enhanced by MM/FS/Block developers.
>
> As other disadvantage of zswap writeback, frontswap's semantic is
> synchronous API so zswap should decompress in memory zpage
> right before writeback and even, it writes pages one by one,
> not a batch. If we extend frontswap API, we would enhance it but
> I belive we can do better in device mapper layer which is aware of
> block align, bandwidth, mapping table, asynchronous and lots of hints
> from the block layer. Nonetheless, if we should merge zram's
> functionality to zswap, I think zram should include zswap's
> functionaliy(But I hope it will never happen) because old age zram
> already has lots of real users rather than new young zswap so it's
> more handy to unify them with keeping changelog which is one of
> valuable things getting from staging stay for a long time.
>
> The reason zram doesn't support writeback until now is just shortage
> of needs. The zram's main customers were embedded people so writeback
> into real swap storage is too bad for interactivity and wear-leveling
> on low falsh devices. But like above, zram has a potential to support
> writeback with other block drivers or more reasonable VM enhance
> so I'd like to claim zram's block concept is really good.
>
> Another zram-blk's usecase is following as.
> The admin can format /dev/zramX with any FS and mount on it.
> It could help small memory system, too. For exmaple, many embedded
> system don't have swap so although tmpfs can support swapout,
> it's pointless. Then, let's assume temp file growing up until half
> of system memory once in a while. We don't want to write it on flash
> by wear-leveing issue and response problem so we want to keep in-memory.
> But if we use tmpfs, it should evict half of working set to cover them
> when the size reach peak. In the case, zram-blk would be good fit, too.
>
> I'd like to enhance zram with more features like zsmalloc-compaction,
> , async I/O, parallel decompression and so on but zram developers cannot
> do it now because Greg, staging maintainer, doesn't want to add new feature
> until promotion is done because zram have been in staging for a very long time.
> Acutally, some patches about enhance are pending for a long time.
>
> [1] https://lkml.org/lkml/2013/8/21/141
>
Hello Andrew,
I'd like to listen your opinion.
The zram promotion trial started since Aug 2012 and I already have get many
Acked/Reviewed feedback and positive feedback from Rik and Bob in this thread.
(ex, Jens Axboe[1], Konrad Rzeszutek Wilk[2], Nitin Gupta[3], Pekka Enberg[4])
In Linuxcon, Hugh gave positive feedback about zram(Hugh, If I misunderstood,
please correct me!). And there are lots of users already in embedded industry
ex, (most of TV in the world, Chromebook, CyanogenMod, Android Kitkat.)
They are not idiot. Zram is really effective for embedded world.
We spent much time with preventing zram enhance since it have been in staging
and Greg never want to improve without promotion.
Please consider promotion and let us improve it.
I think only remained thing is your decision.
1. https://lkml.org/lkml/2012/9/11/551
2. https://lkml.org/lkml/2012/8/9/636
3. https://lkml.org/lkml/2012/8/8/390
4. https://lkml.org/lkml/2012/9/26/126
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-12 15:41 ` Minchan Kim
@ 2013-11-13 2:42 ` Greg KH
2013-11-13 6:24 ` Nitin Gupta
2013-11-14 4:00 ` Hugh Dickins
1 sibling, 1 reply; 25+ messages in thread
From: Greg KH @ 2013-11-13 2:42 UTC (permalink / raw)
To: Minchan Kim
Cc: Andrew Morton, Nitin Gupta, Seth Jennings, lliubbo, jmarchan,
mgorman, riel, hughd, linux-mm, linux-kernel, Luigi Semenzato
On Wed, Nov 13, 2013 at 12:41:38AM +0900, Minchan Kim wrote:
> We spent much time with preventing zram enhance since it have been in staging
> and Greg never want to improve without promotion.
It's not "improve", it's "Greg does not want you adding new features and
functionality while the code is in staging." I want you to spend your
time on getting it out of staging first.
Now if something needs to be done based on review and comments to the
code, then that's fine to do and I'll accept that, but I've been seeing
new functionality be added to the code, which I will not accept because
it seems that you all have given up on getting it merged, which isn't
ok.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-13 2:42 ` Greg KH
@ 2013-11-13 6:24 ` Nitin Gupta
0 siblings, 0 replies; 25+ messages in thread
From: Nitin Gupta @ 2013-11-13 6:24 UTC (permalink / raw)
To: Greg KH, Minchan Kim
Cc: Andrew Morton, Seth Jennings, lliubbo, jmarchan, mgorman, riel,
hughd, linux-mm, linux-kernel, Luigi Semenzato
On 11/12/13, 6:42 PM, Greg KH wrote:
> On Wed, Nov 13, 2013 at 12:41:38AM +0900, Minchan Kim wrote:
>> We spent much time with preventing zram enhance since it have been in staging
>> and Greg never want to improve without promotion.
>
> It's not "improve", it's "Greg does not want you adding new features and
> functionality while the code is in staging." I want you to spend your
> time on getting it out of staging first.
>
> Now if something needs to be done based on review and comments to the
> code, then that's fine to do and I'll accept that, but I've been seeing
> new functionality be added to the code, which I will not accept because
> it seems that you all have given up on getting it merged, which isn't
> ok.
>
It's not that people have given up on getting it merged but every time
patches are posted, there is really no response from maintainers perhaps
due to their lack of interest in embedded, or perhaps they believe
embedded folks are making a wrong choice by using zram. Either way, a
final word, instead of just silence would be more helpful.
Thanks,
Nitin
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-12 15:41 ` Minchan Kim
2013-11-13 2:42 ` Greg KH
@ 2013-11-14 4:00 ` Hugh Dickins
2013-11-14 16:21 ` Seth Jennings
2013-11-15 0:31 ` Minchan Kim
1 sibling, 2 replies; 25+ messages in thread
From: Hugh Dickins @ 2013-11-14 4:00 UTC (permalink / raw)
To: Minchan Kim
Cc: Greg KH, Andrew Morton, Jens Axboe, Nitin Gupta, Seth Jennings,
lliubbo, jmarchan, mgorman, riel, linux-mm, linux-kernel,
Luigi Semenzato
On Wed, 13 Nov 2013, Minchan Kim wrote:
> On Thu, Nov 07, 2013 at 04:04:51PM +0900, Minchan Kim wrote:
> > On Wed, Nov 06, 2013 at 07:05:11PM -0800, Greg KH wrote:
> > > On Wed, Nov 06, 2013 at 03:46:19PM -0800, Nitin Gupta wrote:
> > > > I'm getting really tired of them hanging around in here for many years
> > > > > now...
> > > > >
> > > >
> > > > Minchan has tried many times to promote zram out of staging. This was
> > > > his most recent attempt:
> > > >
> > > > https://lkml.org/lkml/2013/8/21/54
...
>
> Hello Andrew,
>
> I'd like to listen your opinion.
>
> The zram promotion trial started since Aug 2012 and I already have get many
> Acked/Reviewed feedback and positive feedback from Rik and Bob in this thread.
> (ex, Jens Axboe[1], Konrad Rzeszutek Wilk[2], Nitin Gupta[3], Pekka Enberg[4])
> In Linuxcon, Hugh gave positive feedback about zram(Hugh, If I misunderstood,
> please correct me!). And there are lots of users already in embedded industry
> ex, (most of TV in the world, Chromebook, CyanogenMod, Android Kitkat.)
> They are not idiot. Zram is really effective for embedded world.
Sorry for taking so long to respond, Minchan: no, you do not misrepresent
me at all. Promotion of zram and zsmalloc from staging is way overdue:
they long ago proved their worth, look tidy, and have an active maintainer.
Putting them into drivers/staging was always a mistake, and I quite
understand Greg's impatience with them by now; but please let's move
them to where they belong instead of removing them.
I would not have lent support to zswap if I'd thought that was going to
block zram. And I was not the only one surprised when zswap replaced its
use of zsmalloc by zbud: we had rather expected a zbud option to be added,
and I still assume that zsmalloc support will be added back to zswap later.
I think your August 2013 posting moved zsmalloc under zram and moved it
all to drivers/block? That is the right place for zram, but I do think
zsmalloc.c (I'm not very keen on _drvs and -mains myself) should be
alongside zbud.c in mm, where we can better keep an eye on its
struct-pageyness.
IMHO
Hugh
>
> We spent much time with preventing zram enhance since it have been in staging
> and Greg never want to improve without promotion.
>
> Please consider promotion and let us improve it.
> I think only remained thing is your decision.
>
>
> 1. https://lkml.org/lkml/2012/9/11/551
> 2. https://lkml.org/lkml/2012/8/9/636
> 3. https://lkml.org/lkml/2012/8/8/390
> 4. https://lkml.org/lkml/2012/9/26/126
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-14 4:00 ` Hugh Dickins
@ 2013-11-14 16:21 ` Seth Jennings
2013-11-15 0:47 ` Bob Liu
2013-11-15 0:31 ` Minchan Kim
1 sibling, 1 reply; 25+ messages in thread
From: Seth Jennings @ 2013-11-14 16:21 UTC (permalink / raw)
To: Hugh Dickins
Cc: Minchan Kim, Greg KH, Andrew Morton, Jens Axboe, Nitin Gupta,
Seth Jennings, lliubbo, jmarchan, mgorman, riel, linux-mm,
linux-kernel, Luigi Semenzato
On Wed, Nov 13, 2013 at 08:00:34PM -0800, Hugh Dickins wrote:
> On Wed, 13 Nov 2013, Minchan Kim wrote:
> > On Thu, Nov 07, 2013 at 04:04:51PM +0900, Minchan Kim wrote:
> > > On Wed, Nov 06, 2013 at 07:05:11PM -0800, Greg KH wrote:
> > > > On Wed, Nov 06, 2013 at 03:46:19PM -0800, Nitin Gupta wrote:
> > > > > I'm getting really tired of them hanging around in here for many years
> > > > > > now...
> > > > > >
> > > > >
> > > > > Minchan has tried many times to promote zram out of staging. This was
> > > > > his most recent attempt:
> > > > >
> > > > > https://lkml.org/lkml/2013/8/21/54
> ...
> >
> > Hello Andrew,
> >
> > I'd like to listen your opinion.
> >
> > The zram promotion trial started since Aug 2012 and I already have get many
> > Acked/Reviewed feedback and positive feedback from Rik and Bob in this thread.
> > (ex, Jens Axboe[1], Konrad Rzeszutek Wilk[2], Nitin Gupta[3], Pekka Enberg[4])
> > In Linuxcon, Hugh gave positive feedback about zram(Hugh, If I misunderstood,
> > please correct me!). And there are lots of users already in embedded industry
> > ex, (most of TV in the world, Chromebook, CyanogenMod, Android Kitkat.)
> > They are not idiot. Zram is really effective for embedded world.
>
> Sorry for taking so long to respond, Minchan: no, you do not misrepresent
> me at all. Promotion of zram and zsmalloc from staging is way overdue:
> they long ago proved their worth, look tidy, and have an active maintainer.
>
> Putting them into drivers/staging was always a mistake, and I quite
> understand Greg's impatience with them by now; but please let's move
> them to where they belong instead of removing them.
>
> I would not have lent support to zswap if I'd thought that was going to
> block zram. And I was not the only one surprised when zswap replaced its
> use of zsmalloc by zbud: we had rather expected a zbud option to be added,
> and I still assume that zsmalloc support will be added back to zswap later.
Yes, it is still the plan to reintroduce zsmalloc as an option (possibly
_the_ option) for zswap.
An idea being tossed around is making zswap writethrough instead of
delayed writeback.
Doing this would be mean that zswap would no longer reduce swap out
traffic, but would continue to reduce swap in latency by reading out of
the compressed cache instead of the swap device.
For that loss, we gain a benefit: the compressed pages in the cache are
clean, meaning we can reclaim them at any time with no writeback
cost. This addresses Mel's initial concern (the one that led to zswap
moving to zbud) about writeback latency when the zswap pool is full.
If there is no writeback cost for reclaiming space in the compressed
pool, then we can use higher density packing like zsmalloc.
Making zswap writethough would also make the difference between zswap
and zram, both in terms of operation and application, more apparent,
demonstrating the need for both.
Seth
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-14 16:21 ` Seth Jennings
@ 2013-11-15 0:47 ` Bob Liu
0 siblings, 0 replies; 25+ messages in thread
From: Bob Liu @ 2013-11-15 0:47 UTC (permalink / raw)
To: Seth Jennings
Cc: Hugh Dickins, Minchan Kim, Greg KH, Andrew Morton, Jens Axboe,
Nitin Gupta, Seth Jennings, lliubbo, jmarchan, mgorman, riel,
linux-mm, linux-kernel, Luigi Semenzato
On 11/15/2013 12:21 AM, Seth Jennings wrote:
> On Wed, Nov 13, 2013 at 08:00:34PM -0800, Hugh Dickins wrote:
>> On Wed, 13 Nov 2013, Minchan Kim wrote:
>> ...
>>>
>>> Hello Andrew,
>>>
>>> I'd like to listen your opinion.
>>>
>>> The zram promotion trial started since Aug 2012 and I already have get many
>>> Acked/Reviewed feedback and positive feedback from Rik and Bob in this thread.
>>> (ex, Jens Axboe[1], Konrad Rzeszutek Wilk[2], Nitin Gupta[3], Pekka Enberg[4])
>>> In Linuxcon, Hugh gave positive feedback about zram(Hugh, If I misunderstood,
>>> please correct me!). And there are lots of users already in embedded industry
>>> ex, (most of TV in the world, Chromebook, CyanogenMod, Android Kitkat.)
>>> They are not idiot. Zram is really effective for embedded world.
>>
>> Sorry for taking so long to respond, Minchan: no, you do not misrepresent
>> me at all. Promotion of zram and zsmalloc from staging is way overdue:
>> they long ago proved their worth, look tidy, and have an active maintainer.
>>
>> Putting them into drivers/staging was always a mistake, and I quite
>> understand Greg's impatience with them by now; but please let's move
>> them to where they belong instead of removing them.
>>
>> I would not have lent support to zswap if I'd thought that was going to
>> block zram. And I was not the only one surprised when zswap replaced its
>> use of zsmalloc by zbud: we had rather expected a zbud option to be added,
>> and I still assume that zsmalloc support will be added back to zswap later.
>
> Yes, it is still the plan to reintroduce zsmalloc as an option (possibly
> _the_ option) for zswap.
>
> An idea being tossed around is making zswap writethrough instead of
> delayed writeback.
>
> Doing this would be mean that zswap would no longer reduce swap out
> traffic, but would continue to reduce swap in latency by reading out of
> the compressed cache instead of the swap device.
>
> For that loss, we gain a benefit: the compressed pages in the cache are
> clean, meaning we can reclaim them at any time with no writeback
> cost. This addresses Mel's initial concern (the one that led to zswap
> moving to zbud) about writeback latency when the zswap pool is full.
>
Agree!
> If there is no writeback cost for reclaiming space in the compressed
> pool, then we can use higher density packing like zsmalloc.
>
But zsmalloc will compact several 0-order pages together as a zpage
which cause it not easy to reclaim one 0-order page directly from it.
Especially if we want to make zswap pool can be dynamically managed in
future.
> Making zswap writethough would also make the difference between zswap
> and zram, both in terms of operation and application, more apparent,
> demonstrating the need for both.
>
--
Regards,
-Bob
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] staging: zsmalloc: Ensure handle is never 0 on success
2013-11-14 4:00 ` Hugh Dickins
2013-11-14 16:21 ` Seth Jennings
@ 2013-11-15 0:31 ` Minchan Kim
1 sibling, 0 replies; 25+ messages in thread
From: Minchan Kim @ 2013-11-15 0:31 UTC (permalink / raw)
To: Hugh Dickins, Andrew Morton
Cc: Greg KH, Jens Axboe, Nitin Gupta, Seth Jennings, lliubbo,
jmarchan, mgorman, riel, linux-mm, linux-kernel, Luigi Semenzato
Hello Hugh,
On Wed, Nov 13, 2013 at 08:00:34PM -0800, Hugh Dickins wrote:
> On Wed, 13 Nov 2013, Minchan Kim wrote:
> > On Thu, Nov 07, 2013 at 04:04:51PM +0900, Minchan Kim wrote:
> > > On Wed, Nov 06, 2013 at 07:05:11PM -0800, Greg KH wrote:
> > > > On Wed, Nov 06, 2013 at 03:46:19PM -0800, Nitin Gupta wrote:
> > > > > I'm getting really tired of them hanging around in here for many years
> > > > > > now...
> > > > > >
> > > > >
> > > > > Minchan has tried many times to promote zram out of staging. This was
> > > > > his most recent attempt:
> > > > >
> > > > > https://lkml.org/lkml/2013/8/21/54
> ...
> >
> > Hello Andrew,
> >
> > I'd like to listen your opinion.
> >
> > The zram promotion trial started since Aug 2012 and I already have get many
> > Acked/Reviewed feedback and positive feedback from Rik and Bob in this thread.
> > (ex, Jens Axboe[1], Konrad Rzeszutek Wilk[2], Nitin Gupta[3], Pekka Enberg[4])
> > In Linuxcon, Hugh gave positive feedback about zram(Hugh, If I misunderstood,
> > please correct me!). And there are lots of users already in embedded industry
> > ex, (most of TV in the world, Chromebook, CyanogenMod, Android Kitkat.)
> > They are not idiot. Zram is really effective for embedded world.
>
> Sorry for taking so long to respond, Minchan: no, you do not misrepresent
> me at all. Promotion of zram and zsmalloc from staging is way overdue:
> they long ago proved their worth, look tidy, and have an active maintainer.
>
> Putting them into drivers/staging was always a mistake, and I quite
> understand Greg's impatience with them by now; but please let's move
> them to where they belong instead of removing them.
>
> I would not have lent support to zswap if I'd thought that was going to
> block zram. And I was not the only one surprised when zswap replaced its
> use of zsmalloc by zbud: we had rather expected a zbud option to be added,
> and I still assume that zsmalloc support will be added back to zswap later.
>
> I think your August 2013 posting moved zsmalloc under zram and moved it
> all to drivers/block? That is the right place for zram, but I do think
> zsmalloc.c (I'm not very keen on _drvs and -mains myself) should be
> alongside zbud.c in mm, where we can better keep an eye on its
> struct-pageyness.
It's really no problem and it was what I want from the beginning.
https://lkml.org/lkml/2012/9/11/551
I will do in next posting.
Before that, I'd like to listen Andrew's opinion about promoting because
my previous trials to promote zram have ignored so it was just waste
for my time and noisy for you guys.
Andrew, please tell us your decision. May I go ahead?
>
> IMHO
> Hugh
>
> >
> > We spent much time with preventing zram enhance since it have been in staging
> > and Greg never want to improve without promotion.
> >
> > Please consider promotion and let us improve it.
> > I think only remained thing is your decision.
> >
> >
> > 1. https://lkml.org/lkml/2012/9/11/551
> > 2. https://lkml.org/lkml/2012/8/9/636
> > 3. https://lkml.org/lkml/2012/8/8/390
> > 4. https://lkml.org/lkml/2012/9/26/126
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
Kind regards,
Minchan Kim
^ permalink raw reply [flat|nested] 25+ messages in thread