Skip to contentSkip to conversation

Zram for FreeBSD

DISCUSSION Sergey Senozhatsky 2 participants 5 messages Oct 6, 2016 – Oct 11, 2016 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): CAAdovdkndkBoX3jQiUA1YZgjOyixiBSfoPOWW39zxDt0tP_-=w@mail.gmail.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Hi,

Quoted 1 line · Cory Pruce

Could one of you tell me why these compression algo’s were chosen,

zram supports more than that.
https://marc.info/?l=linux-kernel&m=146469777105130

Quoted 1 line

if they were implemented as a need for zram, and

hm... not all of them (if any at all). lzo, *may be*, was motivated by "compression/decompression perfromance VS compression ratio", which is imporatant for zram.

Quoted 1 line

what the policy is on porting these to FreeBSD?

no idea.

	-ss
#5 lore raw

Cool, I am starting to get a good grasp on what is going on (I’ll probably need to use FreeBSD’s archive.h as opposed to Linux’s crypto.h). I am trying to get a hold on what exactly I need to port to FreeBSD. I see that (as Nitin suggested) zsmalloc is the main brains of handling the objects and that it creates a fixed amount of sharded “pages” which a compressed (or uncompressed) actual page can span. I see also that that depends on zpool.

I will probably find all “dependencies”; however, if one of you could describe the components used/implemented for this, that’d be awesome. Also, any linux specific setup/layout details come to mind?

Seriously, any details would be appreciated. It will save me time.

Thanks,
Cory

On 10/5/16, 9:43 PM, "Sergey Senozhatsky" <[email protected]> wrote:

Hi,

On (10/05/16 16:47), Cory Pruce wrote:
> Could one of you tell me why these compression algo’s were chosen,

zram supports more than that.
https://marc.info/?l=linux-kernel&m=146469777105130

> if they were implemented as a need for zram, and

hm... not all of them (if any at all). lzo, *may be*, was motivated by "compression/decompression perfromance VS compression ratio", which is imporatant for zram.

> what the policy is on porting these to FreeBSD?

no idea.

-ss

#6 lore raw
Quoted 6 lines · Cory Pruce

Cool, I am starting to get a good grasp on what is going on (I’ll probably need to use FreeBSD’s archive.h as opposed to Linux’s crypto.h). I am trying to get a hold on what exactly I need to port to FreeBSD. I see that (as Nitin suggested) zsmalloc is the main brains of handling the objects and that it creates a fixed amount of sharded “pages” which a compressed (or uncompressed) actual page can span. I see also that that depends on zpool.

zsmalloc doesn't depend on zpool. zpool is an abstraction layer used by zswap.

Quoted 3 lines

I will probably find all “dependencies”; however, if one of you could describe the components used/implemented for this, that’d be awesome. Also, any linux specific setup/layout details come to mind?

there is a whole bunch of hacks that Nitin, Minchan and others used in zsmalloc() to minimize its space consumption (struct page fields re-usage, etc). comments in zsmalloc() can shed some light.

	-ss