Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1215468

Re: [PATCH] btrfs: trimming some start_transaction() code away

From David Sterba <dsterba@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH] btrfs: trimming some start_transaction() code away
Date 2015-08-28 19:40 +0200
Message-ID <q2vN8-1Ec-1@gated-at.bofh.it> (permalink)
References <q2cr9-7g7-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Aug 27, 2015 at 11:53:45PM +0000, Alexandru Moise wrote:
> Just call kmem_cache_zalloc() instead of calling kmem_cache_alloc().
> We're just initializing most fields to 0, false and NULL later on
> _anyway_, so to make the code mode readable and potentially gain
> a bit of performance (completely untested claim), we should fill our
> btrfs_trans_handle with zeros on allocation then just initialize
> those five remaining fields (not counting the list_heads) as normal.
> 
> Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>

The performance gain is arguable but the generated code should be
smaller, which counts.

Reviewed-by: David Sterba <dsterba@suse.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] btrfs: trimming some start_transaction() code away Alexandru Moise <00moses.alexander00@gmail.com> - 2015-08-27 23:00 +0200
  Re: [PATCH] btrfs: trimming some start_transaction() code away David Sterba <dsterba@suse.cz> - 2015-08-28 19:40 +0200
    Re: [PATCH] btrfs: trimming some start_transaction() code away Alexandru Moise <00moses.alexander00@gmail.com> - 2015-08-29 05:10 +0200

csiph-web