linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Zram/Zmalloc Questions
       [not found] <CANOqyr7Lwgyax9F4Jogi=ecqKMbCTUQ5LmuXVk5LfTk0ksv4rg@mail.gmail.com>
@ 2016-11-08  0:33 ` Sergey Senozhatsky
       [not found]   ` <CANOqyr4GuFs+Ayt7UFUKnssTFTP=NTRcP-p12xjPpvqxV4+ZYg@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Senozhatsky @ 2016-11-08  0:33 UTC (permalink / raw)
  To: Cory Pruce; +Cc: Nitin Gupta, Sergey Senozhatsky, minchan, linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Zram/Zmalloc Questions
       [not found]   ` <CANOqyr4GuFs+Ayt7UFUKnssTFTP=NTRcP-p12xjPpvqxV4+ZYg@mail.gmail.com>
@ 2016-11-08  3:46     ` Sergey Senozhatsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2016-11-08  3:46 UTC (permalink / raw)
  To: Cory Pruce; +Cc: Sergey Senozhatsky, Nitin Gupta, minchan, linux-kernel

On (11/07/16 19:36), Cory Pruce wrote:
>    Also, my emails get marked as spam by [1]vger.kernel.org. Any experience
>    with this?

switch to plain-text mode. don't send out in HTML format as you do now.

	-ss

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-08  3:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CANOqyr7Lwgyax9F4Jogi=ecqKMbCTUQ5LmuXVk5LfTk0ksv4rg@mail.gmail.com>
2016-11-08  0:33 ` Zram/Zmalloc Questions Sergey Senozhatsky
     [not found]   ` <CANOqyr4GuFs+Ayt7UFUKnssTFTP=NTRcP-p12xjPpvqxV4+ZYg@mail.gmail.com>
2016-11-08  3:46     ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).