On Mon, Jul 17, 2017 at 4:56 PM, Vishal Verma <[email protected]> wrote:
> With the ACPI NFIT 'DSM' methods, acpi can be called from IO paths.
> Specifically, the DSM to clear media errors is called during writes, so
> that we can provide a writes-fix-errors model.
>
> However it is easy to imagine a scenario like:
>  -> write through the nvdimm driver
>    -> acpi allocation
>      -> writeback, causes more IO through the nvdimm driver
>        -> deadlock
>
> Fix this by using memalloc_noio_{save,restore}, which sets the GFP_NOIO
> flag for the current scope when issuing commands/IOs that are expected
> to clear errors.
>
> Cc: <[email protected]>
> Cc: <[email protected]>
> Cc: Dan Williams <[email protected]>
> Cc: Robert Moore <[email protected]>
> Cc: Rafael J. Wysocki <[email protected]>
> Signed-off-by: Vishal Verma <[email protected]>

Looks good to me. Please move this up in the series before we start
calling nvdimm_clear_poison() in the btt I/O path so there's no
bisection point where this deadlock comes back.
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to