linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: valdis.kletnieks@vt.edu
To: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
Cc: Adam Borowski <kilobyte@angband.pl>,
	Pintu Agarwal <pintu.ping@gmail.com>,
	linux-mm@kvack.org, open list <linux-kernel@vger.kernel.org>,
	kernelnewbies@kernelnewbies.org
Subject: Re: Creating compressed backing_store as swapfile
Date: Mon, 05 Nov 2018 11:53:56 -0500	[thread overview]
Message-ID: <83467.1541436836@turing-police.cc.vt.edu> (raw)
In-Reply-To: <6a1f57b6-503c-48a2-689b-3c321cd6d29f@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

On Mon, 05 Nov 2018 11:28:49 -0500, "Austin S. Hemmelgarn" said:

> Also, it's probably worth noting that BTRFS doesn't need to decompress
> the entire file to read or write blocks in the middle, it splits the
> file into 128k blocks and compresses each of those independent of the
> others, so it can just decompress the 128k block that holds the actual
> block that's needed.

Presumably it does something sane with block allocation for the now-compressed
128K that's presumably much smaller.  Also, that limits the damage from writing to
the middle of a compression unit....

That *does* however increase the memory requirement - you can OOM or
deadlock if your read/write from the swap needs an additional 128K for the
compression buffer at an inconvenient time...


[-- Attachment #2: Type: application/pgp-signature, Size: 486 bytes --]

  reply	other threads:[~2018-11-05 16:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 15:01 Creating compressed backing_store as swapfile Pintu Agarwal
2018-11-05 15:58 ` Adam Borowski
2018-11-05 16:07   ` Austin S. Hemmelgarn
2018-11-05 16:14     ` valdis.kletnieks
2018-11-05 16:28       ` Austin S. Hemmelgarn
2018-11-05 16:53         ` valdis.kletnieks [this message]
2018-11-05 16:55           ` Austin S. Hemmelgarn
2018-11-08  9:51     ` Pintu Agarwal
2018-11-05 16:12 ` valdis.kletnieks
2018-11-08  9:46   ` Pintu Agarwal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83467.1541436836@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=ahferroin7@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=kilobyte@angband.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pintu.ping@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).