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 handling

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 specia

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 h

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 sho

[PATCH 4/6] SQUSHME: pmem: Micro cleaning

2015-03-31 Thread Boaz Harrosh
Some error checks had unlikely some did not. Put unlikely on all error handling paths. (I like unlikely for error paths specially for readability) Also use bio_data_dir() to extract away the READA flag Signed-off-by: Boaz Harrosh --- drivers/block/pmem.c | 16 +++- 1 file changed,