lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Sep 2015 17:03:18 -0700
From:	Dan Williams <dan.j.williams@...el.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Jens Axboe <axboe@...nel.dk>,
	linux-nvdimm <linux-nvdimm@...1.01.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux MM <linux-mm@...ck.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Ross Zwisler <ross.zwisler@...ux.intel.com>
Subject: Re: [PATCH 08/15] block, dax, pmem: reference counting infrastructure

On Thu, Sep 24, 2015 at 8:15 AM, Christoph Hellwig <hch@...radead.org> wrote:
> On Wed, Sep 23, 2015 at 12:41:55AM -0400, Dan Williams wrote:
>> Enable DAX to use a reference count for keeping the virtual address
>> returned by ->direct_access() valid for the duration of its usage in
>> fs/dax.c, or otherwise hold off blk_cleanup_queue() while
>> pmem_make_request is active.  The blk-mq code is already in a position
>> to need low overhead referece counting for races against request_queue
>> destruction (blk_cleanup_queue()).  Given DAX-enabled block drivers do
>> not enable blk-mq, share the storage in 'struct request_queue' between
>> the two implementations.
>
> Can we just move the refcounting to common code with the same field
> name, and even initialize it for non-mq, non-dax queues but just never
> tage a reference there (for now)?

That makes sense to me, especially because drivers/nvdimm/blk.c is
broken in the same way as drivers/nvdimm/pmem.c and it would be
awkward to have it use blk_dax_get() / blk_dax_put().  The
percpu_refcount should be valid for all queues and it will only ever
be > 1 in the blk_mq and libnvdimm cases (for now).  Will fix.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ