Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1621593 > unrolled thread
| Started by | Jeff Moyer <jmoyer@redhat.com> |
|---|---|
| First post | 2017-04-11 22:10 +0200 |
| Last post | 2017-04-11 22:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] libnvdimm: fix btt vs clear poison locking Jeff Moyer <jmoyer@redhat.com> - 2017-04-11 22:10 +0200
Re: [PATCH] libnvdimm: fix btt vs clear poison locking Dan Williams <dan.j.williams@intel.com> - 2017-04-11 22:20 +0200
| From | Jeff Moyer <jmoyer@redhat.com> |
|---|---|
| Date | 2017-04-11 22:10 +0200 |
| Subject | Re: [PATCH] libnvdimm: fix btt vs clear poison locking |
| Message-ID | <tvagV-3eF-7@gated-at.bofh.it> |
Dan Williams <dan.j.williams@intel.com> writes:
> As a minimal fix, disable error clearing when the BTT is enabled. For
> the final fix a larger rework of the poison list locking is needed.
> @@ -243,7 +243,15 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
> }
>
> if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) {
> - if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512)) {
> + /*
> + * FIXME: nsio_rw_bytes() may be called from atomic
> + * context in the BTT case and nvdimm_clear_poison()
> + * takes a sleeping lock. Until the locking can be
> + * reworked this capability depends on !BTT or BROKEN.
> + */
> + if ((!IS_ENABLED(CONFIG_BTT) || IS_ENABLED(CONFIG_BROKEN))
> + && IS_ALIGNED(offset, 512)
> + && IS_ALIGNED(size, 512)) {
I don't like that you've disabled clear error just because the btt
driver was enabled. Can't you do something like this, instead?
disable_clear_poison = (ndns->claim && is_nd_btt(ndns->claim));
if (!disable_clear_poison && IS_ALIGNED(offset, 512)...
-Jeff
[toc] | [next] | [standalone]
| From | Dan Williams <dan.j.williams@intel.com> |
|---|---|
| Date | 2017-04-11 22:20 +0200 |
| Message-ID | <tvaqC-3i9-7@gated-at.bofh.it> |
| In reply to | #1621593 |
On Tue, Apr 11, 2017 at 1:08 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
> Dan Williams <dan.j.williams@intel.com> writes:
>
>> As a minimal fix, disable error clearing when the BTT is enabled. For
>> the final fix a larger rework of the poison list locking is needed.
>
>> @@ -243,7 +243,15 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
>> }
>>
>> if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) {
>> - if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512)) {
>> + /*
>> + * FIXME: nsio_rw_bytes() may be called from atomic
>> + * context in the BTT case and nvdimm_clear_poison()
>> + * takes a sleeping lock. Until the locking can be
>> + * reworked this capability depends on !BTT or BROKEN.
>> + */
>> + if ((!IS_ENABLED(CONFIG_BTT) || IS_ENABLED(CONFIG_BROKEN))
>> + && IS_ALIGNED(offset, 512)
>> + && IS_ALIGNED(size, 512)) {
>
> I don't like that you've disabled clear error just because the btt
> driver was enabled. Can't you do something like this, instead?
Ooh, yes we can and that's much better.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web