From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning Date: Tue, 31 Mar 2015 18:24:22 +0300 Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Christoph Hellwig , Jens Axboe , linux-nvdimm , X86 ML , "linux-kernel@vger.kernel.org" , linux-fsdevel To: Dan Williams Return-path: Received: from mail-wg0-f49.google.com ([74.125.82.49]:34614 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753063AbbCaPY0 (ORCPT ); Tue, 31 Mar 2015 11:24:26 -0400 Received: by wgbdm7 with SMTP id dm7so23299021wgb.1 for ; Tue, 31 Mar 2015 08:24:24 -0700 (PDT) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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? So we do not fill up the branch predictor with useless predictions that will never matter. What is so bad with that. It may be cold path but added up all over it will show eventually. I do not see what is the harm of telling the compiler. "never store any prediction for this branch" So since it can never (ever) harm any one or anything, and at the mass if everywhere it was done this way it could actually help, then sure it can be a readability thing. Since no harm done, right? I still like it Thanks Boaz