linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: GFP_ATOMIC versus GFP_NOWAIT
Date: Fri, 13 Nov 2009 10:17:36 +0100	[thread overview]
Message-ID: <87k4xuu6kv.fsf@basil.nowhere.org> (raw)
In-Reply-To: <e9c3a7c20911121728n647ab121l7f7c5827afdac887@mail.gmail.com> (Dan Williams's message of "Thu, 12 Nov 2009 18:28:18 -0700")

Dan Williams <dan.j.williams@intel.com> writes:

> Looking through the tree it seems that almost all drivers that need to
> allocate memory in atomic contexts use GFP_ATOMIC.  I have been asking
> dmaengine device driver authors to switch their atomic allocations to
> GFP_NOWAIT.  The rationale being that in most cases a dma device is
> either offloading an operation that will automatically fallback to
> software when the descriptor allocation fails, or we can simply poll
> and wait for the dma device to release some in use descriptors.  So it
> does not make sense to grab from the emergency pools when the result
> of an allocation failure is some additional cpu overhead.  Am I
> correct in my nagging, and should this idea be spread outside of
> drivers/dma/ to cut down on GFP_ATOMIC usage, or is this not a big
> issue?

It's probably hard to find a good global priority order between
the various allocators, depending on how much the fallback costs. 
But in principle it sounds like a good idea.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2009-11-13  9:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13  1:28 Dan Williams
2009-11-13  9:17 ` Andi Kleen [this message]

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=87k4xuu6kv.fsf@basil.nowhere.org \
    --to=andi@firstfloor.org \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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