From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932298AbbCaPbD (ORCPT ); Tue, 31 Mar 2015 11:31:03 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:34464 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751830AbbCaPa6 (ORCPT ); Tue, 31 Mar 2015 11:30:58 -0400 MIME-Version: 1.0 In-Reply-To: <551ABC26.3000008@plexistor.com> References: <1427358764-6126-1-git-send-email-hch@lst.de> <55143A8B.2060304@plexistor.com> <20150331092526.GA25958@lst.de> <551A9EB3.8000605@plexistor.com> <551AA0AD.4000604@plexistor.com> <551ABC26.3000008@plexistor.com> Date: Tue, 31 Mar 2015 08:30:57 -0700 Message-ID: Subject: Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning From: Dan Williams To: Boaz Harrosh Cc: Christoph Hellwig , Jens Axboe , linux-nvdimm , X86 ML , "linux-kernel@vger.kernel.org" , linux-fsdevel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 31, 2015 at 8:24 AM, Boaz Harrosh wrote: > On 03/31/2015 06:17 PM, Dan Williams wrote: >> On Tue, Mar 31, 2015 at 6:27 AM, Boaz Harrosh wrote: >>> >>> Some error checks had unlikely some did not. Put unlikely >>> on all error handling paths. >>> (I like unlikely for error paths specially for readability) >> >> "unlikely()" is not a readability hint, it's specifically for branches >> that profiling shows adding it makes a difference. Just delete them >> all until profiling show they make a difference. They certainly don't >> make a difference in the slow paths. >> > > Why? Because the compiler and cpu already does a decent job, and if you get the frequency wrong it can hurt performance [1]. It's pre-mature optimization to sprinkle them around, especially in slow paths. [1]: https://lwn.net/Articles/420019/