lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 8 Nov 2016 09:33:56 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To:     Cory Pruce <corypruce@...il.com>
Cc:     Nitin Gupta <nitingupta910@...il.com>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        minchan@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: Zram/Zmalloc Questions

On (11/07/16 10:50), Cory Pruce wrote:
>    I see in zsmalloc.c that zsmalloc is mounted as a pseudo filesystem (block
>    device I believe). However, there are empty implementations of
>    zsmalloc_mount and zsmalloc_unmount for when CONFIG_COMPACTION is not set.

no. it's because compaction needs an inode via alloc_anon_inode().
look at inode->i_mapping->a_ops. zsmalloc does require or depend on
mounting otherwise.

[..]
>    Why is bit_spin_lock being used instead of the general spin_lock? Is there
>    some performance benefit?

no. to save the memory. look at bits squeezing from handle. otherwise,
one would have to allocate both handle and a 4-byte spin_lock. I believe
bit_spin_lock in general have worse performance than spin_lock, just
because spin_lock is not always "a silly busy loop", while bit_spin_lock
is.

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ