On Mon, Jul 17, 2017 at 4:56 PM, Vishal Verma <vishal.l.verma@xxxxxxxxx> 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: <linux-acpi@xxxxxxxxxxxxxxx> > Cc: <linux-nvdimm@xxxxxxxxxxxx> > Cc: Dan Williams <dan.j.williams@xxxxxxxxx> > Cc: Robert Moore <robert.moore@xxxxxxxxx> > Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> > Signed-off-by: Vishal Verma <vishal.l.verma@xxxxxxxxx> 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. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html