From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Williams Subject: Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning Date: Tue, 31 Mar 2015 08:30:57 -0700 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Christoph Hellwig , Jens Axboe , linux-nvdimm , X86 ML , "linux-kernel@vger.kernel.org" , linux-fsdevel To: Boaz Harrosh Return-path: In-Reply-To: <551ABC26.3000008@plexistor.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.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/