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

2015-08-28 Thread Alexandru Moise
On Fri, Aug 28, 2015 at 07:38:56PM +0200, David Sterba wrote: > On Thu, Aug 27, 2015 at 11:53:45PM +, 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 th

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

2015-08-28 Thread David Sterba
On Thu, Aug 27, 2015 at 11:53:45PM +, 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 (comp

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

2015-08-27 Thread Alexandru Moise
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