From: Vishal Verma <vishal.l.verma@intel.com>
To: linux-nvdimm@lists.01.org
Cc: linux-acpi@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Jeff Moyer <jmoyer@redhat.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Toshi Kani <toshi.kani@hpe.com>,
Vishal Verma <vishal.l.verma@intel.com>
Subject: [PATCH 5/6] acpi: change memory allocations to GFP_NOIO
Date: Fri, 14 Jul 2017 16:11:47 -0600 [thread overview]
Message-ID: <20170714221148.11232-6-vishal.l.verma@intel.com> (raw)
In-Reply-To: <20170714221148.11232-1-vishal.l.verma@intel.com>
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
Making the acpi allocations GPF_NOIO would ensure that it doesn't
trigger writeback, and avoids the above deadlock.
Cc: <linux-acpi@vger.kernel.org>
Cc: <linux-nvdimm@lists.01.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
include/acpi/platform/aclinuxex.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h
index efdff52..9bd54ec 100644
--- a/include/acpi/platform/aclinuxex.h
+++ b/include/acpi/platform/aclinuxex.h
@@ -83,12 +83,12 @@ acpi_status acpi_os_terminate(void);
*/
static inline void *acpi_os_allocate(acpi_size size)
{
- return kmalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
+ return kmalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_NOIO);
}
static inline void *acpi_os_allocate_zeroed(acpi_size size)
{
- return kzalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
+ return kzalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_NOIO);
}
static inline void acpi_os_free(void *memory)
@@ -99,7 +99,7 @@ static inline void acpi_os_free(void *memory)
static inline void *acpi_os_acquire_object(acpi_cache_t * cache)
{
return kmem_cache_zalloc(cache,
- irqs_disabled()? GFP_ATOMIC : GFP_KERNEL);
+ irqs_disabled()? GFP_ATOMIC : GFP_NOIO);
}
static inline acpi_thread_id acpi_os_get_thread_id(void)
--
2.9.3
next prev parent reply other threads:[~2017-07-14 22:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 22:11 [PATCH 0/6] BTT error clearing rework Vishal Verma
2017-07-14 22:11 ` [PATCH 1/6] btt: fix a missed NVDIMM_IO_ATOMIC case in the write path Vishal Verma
2017-07-14 22:11 ` [PATCH 2/6] btt: refactor map entry operations with macros Vishal Verma
[not found] ` <20170714221148.11232-1-vishal.l.verma-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-07-14 22:11 ` [PATCH 3/6] btt: ensure that flags were also unchanged during a map_read Vishal Verma
2017-07-14 22:11 ` [PATCH 6/6] libnvdimm, btt: rework error clearing Vishal Verma
2017-07-14 22:11 ` [PATCH 4/6] btt: cache sector_size in arena_info Vishal Verma
2017-07-14 22:11 ` Vishal Verma [this message]
2017-07-15 5:26 ` [PATCH 5/6] acpi: change memory allocations to GFP_NOIO Dan Williams
2017-07-15 12:45 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170714221148.11232-6-vishal.l.verma@intel.com \
--to=vishal.l.verma@intel.com \
--cc=dan.j.williams@intel.com \
--cc=jmoyer@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=rafael.j.wysocki@intel.com \
--cc=toshi.kani@hpe.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).