All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Ivan Shapovalov <intelfx100@gmail.com>
Cc: reiserfs-devel@vger.kernel.org
Subject: Re: reiser4: discard implementation, pass 2: allocation issues
Date: Tue, 17 Jun 2014 02:37:16 +0200	[thread overview]
Message-ID: <539F8DBC.4010000@gmail.com> (raw)
In-Reply-To: <3381547.FkGuFJAHk4@intelfx-laptop>


On 06/16/2014 01:47 PM, Ivan Shapovalov wrote:
[...]
>
> Are the blocknr sets comfortable?
> Say, can we organize the discard process via the blocknr_set_iterator()?
> If yes, then let's do everything via the blocknr sets (i.e. let's
> implement the
> first option). Add needed operations to blocknrset.c, the discard iteration
> actor to discard.c, etc.
> No, they aren't, and this is a problem. As I said, they are not just unsorted,
> they are unsortable as I understand them.
>


Yup, blocknr sets minimize memory consumption and are unsortable...

I think that the cleanest option will be using lists (instead of blocknr 
sets) for
the delete sets, if the discard is turned on. It will reduce memory 
consumption
by 20%. Indeed, every entry in a blocknr_set occupies ~8 bytes (assuming
that everything is pretty fragmented because of txmod=wa), whereas a list
entry occupies 32 bytes (start, length, plus 2 pointers for the link).

In this option we'll need to join lists (instead of merging blocknr 
sets) during
atoms fusion and apply the list (instead of blocknr set) to the COMMIT 
BITMAP
at pre_commit_hook(). I think it won't be a problem, since the lists are 
simpler
than blocknr sets.

The next option is to leave everything as is.

  reply	other threads:[~2014-06-17  0:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 20:28 reiser4: discard implementation, pass 2: allocation issues Ivan Shapovalov
2014-06-15 17:36 ` Edward Shishkin
2014-06-15 18:07   ` Ivan Shapovalov
2014-06-15 21:49     ` Edward Shishkin
2014-06-15 21:58       ` Ivan Shapovalov
2014-06-16  0:14         ` Edward Shishkin
2014-06-16  5:03           ` Ivan Shapovalov
2014-06-16  9:24             ` Edward Shishkin
2014-06-16 11:00               ` Ivan Shapovalov
2014-06-16 11:32                 ` Edward Shishkin
2014-06-16 11:47                   ` Ivan Shapovalov
2014-06-17  0:37                     ` Edward Shishkin [this message]
2014-06-17 10:14                       ` Ivan Shapovalov
2014-06-17 10:29                         ` Edward Shishkin
2014-06-17 18:31                           ` Ivan Shapovalov
2014-06-17 20:47                             ` Ivan Shapovalov
2014-06-18  1:41                               ` Edward Shishkin
2014-06-18  9:55                                 ` Ivan Shapovalov
2014-06-18 11:49                                   ` Edward Shishkin
2014-06-18 12:26                                     ` Ivan Shapovalov
2014-06-18 22:46                                       ` Edward Shishkin
2014-06-18  0:30                             ` Edward Shishkin

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=539F8DBC.4010000@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=intelfx100@gmail.com \
    --cc=reiserfs-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.