Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1321926

Re: [PATCH 2/2] block: use DAX for partition table reads

From Dan Williams <dan.j.williams@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] block: use DAX for partition table reads
Date 2016-01-29 19:00 +0100
Message-ID <qWluW-6FF-5@gated-at.bofh.it> (permalink)
References <qWj06-517-39@gated-at.bofh.it> <qWj07-517-55@gated-at.bofh.it> <qWllf-6BJ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jan 29, 2016 at 9:46 AM, Jens Axboe <axboe@fb.com> wrote:
> On 01/29/2016 08:18 AM, Dan Williams wrote:
>>
>> +unsigned char *read_dev_sector(struct block_device *bdev, sector_t n,
>> Sector *p)
>> +{
>>         struct page *page;
>>
>> -       page = read_mapping_page(mapping, (pgoff_t)(n >>
>> (PAGE_CACHE_SHIFT-9)),
>> -                                NULL);
>> +       /* don't populate page cache for dax capable devices */
>> +       if (IS_DAX(bdev->bd_inode))
>> +               page = read_dax_sector(bdev, n);
>> +       else
>> +               page = read_pagecache_sector(bdev, n);
>> +
>
>
> Fall back to non-dax, if dax fails?

I think we need to fail hard otherwise we're back to the original
problem of confusing the dax code that expects to find an empty page
cache.

>
>> +struct page *read_dax_sector(struct block_device *bdev, sector_t n)
>> +{
>> +       struct page *page = __page_cache_alloc(GFP_KERNEL | __GFP_COLD);
>
>
> Why isn't that just alloc_pages()?

Just for symmetry with the same allocation that the pagecache path
makes, but alloc_pages() works too...

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] block: use DAX for partition table reads Dan Williams <dan.j.williams@intel.com> - 2016-01-29 16:20 +0100
  Re: [PATCH 2/2] block: use DAX for partition table reads Jens Axboe <axboe@fb.com> - 2016-01-29 18:50 +0100
    Re: [PATCH 2/2] block: use DAX for partition table reads Dan Williams <dan.j.williams@intel.com> - 2016-01-29 19:00 +0100
  Re: [PATCH 2/2] block: use DAX for partition table reads Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-01-29 20:30 +0100
  Re: [PATCH 2/2] block: use DAX for partition table reads Matthew Wilcox <willy@linux.intel.com> - 2016-01-29 23:50 +0100
  [PATCH v2] block: use DAX for partition table reads Dan Williams <dan.j.williams@intel.com> - 2016-01-30 01:40 +0100

csiph-web