Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Matthew Wilcox
On Tue, Mar 31, 2015 at 06:43:40PM +0300, Boaz Harrosh wrote: > But not here. This is not an optimization this is the *error path*. > What I'm saying is: > "No compiler nor CPU, even if 99% of the time this branch is taken > I still consider it cold. Because it is the error case and

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Boaz Harrosh
On 03/31/2015 06:30 PM, Dan Williams wrote: > 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

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Dan Williams
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

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Boaz Harrosh
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

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Dan Williams
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

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Dan Williams
On Tue, Mar 31, 2015 at 8:24 AM, Boaz Harrosh b...@plexistor.com wrote: On 03/31/2015 06:17 PM, Dan Williams wrote: On Tue, Mar 31, 2015 at 6:27 AM, Boaz Harrosh b...@plexistor.com wrote: Some error checks had unlikely some did not. Put unlikely on all error handling paths. (I like unlikely

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Boaz Harrosh
On 03/31/2015 06:30 PM, Dan Williams wrote: On Tue, Mar 31, 2015 at 8:24 AM, Boaz Harrosh b...@plexistor.com wrote: On 03/31/2015 06:17 PM, Dan Williams wrote: On Tue, Mar 31, 2015 at 6:27 AM, Boaz Harrosh b...@plexistor.com wrote: Some error checks had unlikely some did not. Put unlikely on

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Dan Williams
On Tue, Mar 31, 2015 at 6:27 AM, Boaz Harrosh b...@plexistor.com 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

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Boaz Harrosh
On 03/31/2015 06:17 PM, Dan Williams wrote: On Tue, Mar 31, 2015 at 6:27 AM, Boaz Harrosh b...@plexistor.com 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

Re: [Linux-nvdimm] [PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Matthew Wilcox
On Tue, Mar 31, 2015 at 06:43:40PM +0300, Boaz Harrosh wrote: But not here. This is not an optimization this is the *error path*. What I'm saying is: No compiler nor CPU, even if 99% of the time this branch is taken I still consider it cold. Because it is the error case and