lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 28 Aug 2015 19:38:56 +0200
From:	David Sterba <dsterba@...e.cz>
To:	Alexandru Moise <00moses.alexander00@...il.com>
Cc:	clm@...com, jbacik@...com, dsterba@...e.com,
	linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: trimming some start_transaction() code away

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@...il.com>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ