Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-10-03 Thread Ross Zwisler
On Mon, Oct 03, 2016 at 11:55:18AM +0200, Jan Kara wrote: > On Thu 29-09-16 16:49:25, Ross Zwisler wrote: > > DAX radix tree locking currently locks entries based on the unique > > combination of the 'mapping' pointer and the pgoff_t 'index' for the entry. > > This works for PTEs, but as we move

Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-10-03 Thread Ross Zwisler
On Mon, Oct 03, 2016 at 11:55:18AM +0200, Jan Kara wrote: > On Thu 29-09-16 16:49:25, Ross Zwisler wrote: > > DAX radix tree locking currently locks entries based on the unique > > combination of the 'mapping' pointer and the pgoff_t 'index' for the entry. > > This works for PTEs, but as we move

Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-10-03 Thread Jan Kara
On Thu 29-09-16 16:49:25, Ross Zwisler wrote: > DAX radix tree locking currently locks entries based on the unique > combination of the 'mapping' pointer and the pgoff_t 'index' for the entry. > This works for PTEs, but as we move to PMDs we will need to have all the > offsets within the range

Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-10-03 Thread Jan Kara
On Thu 29-09-16 16:49:25, Ross Zwisler wrote: > DAX radix tree locking currently locks entries based on the unique > combination of the 'mapping' pointer and the pgoff_t 'index' for the entry. > This works for PTEs, but as we move to PMDs we will need to have all the > offsets within the range

Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-09-30 Thread Christoph Hellwig
> +static pgoff_t dax_entry_start(pgoff_t index, void *entry) > +{ > + if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > + index &= (PMD_MASK >> PAGE_SHIFT); > + return index; > +} > + > static wait_queue_head_t *dax_entry_waitqueue(struct address_space *mapping, > -

Re: [PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-09-30 Thread Christoph Hellwig
> +static pgoff_t dax_entry_start(pgoff_t index, void *entry) > +{ > + if (RADIX_DAX_TYPE(entry) == RADIX_DAX_PMD) > + index &= (PMD_MASK >> PAGE_SHIFT); > + return index; > +} > + > static wait_queue_head_t *dax_entry_waitqueue(struct address_space *mapping, > -

[PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-09-29 Thread Ross Zwisler
DAX radix tree locking currently locks entries based on the unique combination of the 'mapping' pointer and the pgoff_t 'index' for the entry. This works for PTEs, but as we move to PMDs we will need to have all the offsets within the range covered by the PMD to map to the same bit lock. To

[PATCH v4 07/12] dax: coordinate locking for offsets in PMD range

2016-09-29 Thread Ross Zwisler
DAX radix tree locking currently locks entries based on the unique combination of the 'mapping' pointer and the pgoff_t 'index' for the entry. This works for PTEs, but as we move to PMDs we will need to have all the offsets within the range covered by the PMD to map to the same bit lock. To