public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: Mark Haverkamp <markh@osdl.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	Mark Salyzyn <mark_salyzyn@adaptec.com>
Subject: Re: [PATCH 2/7] aacraid: aacraid: AIF preallocation
Date: Sun, 25 Sep 2005 09:41:24 -0500	[thread overview]
Message-ID: <1127659284.4839.1.camel@mulgrave> (raw)
In-Reply-To: <1127246170.1891.32.camel@markh1.pdx.osdl.net>

On Tue, 2005-09-20 at 12:56 -0700, Mark Haverkamp wrote:
> +                                && ((hw_fib_pool = kmalloc(sizeof
> (struct hw_fib *) * num, GFP_ATOMIC|GFP_KERNEL)))
> +                                && ((fib_pool = kmalloc(sizeof(struct
> fib *) * num, GFP_ATOMIC|GFP_KERNEL)))) {
> +                                       hw_fib_p = hw_fib_pool;
> +                                       fib_p = fib_pool;
> +                                       while (hw_fib_p < &hw_fib_pool
> [num]) {
> +                                               if (!(*(hw_fib_p++) =
> kmalloc(sizeof(struct hw_fib), GFP_ATOMIC|GFP_KERNEL))) {
> +                                                       --hw_fib_p;
> +                                                       break;
> +                                               }
> +                                               if (!(*(fib_p++) =
> kmalloc(sizeof(struct fib), GFP_ATOMIC|GFP_KERNEL))) {

all of these allocations should be either GFP_ATOMIC or GFP_KERNEL, but
not both (it looks like they should be GFP_KERNEL).  What GFP_KERNEL|
GFP_ATOMIC actually gives you is a potentially sleeping allocation that
will exhaust the emergency pools, which sounds really undesirable.

James



  reply	other threads:[~2005-09-25 14:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-20 19:56 [PATCH 2/7] aacraid: aacraid: AIF preallocation Mark Haverkamp
2005-09-25 14:41 ` James Bottomley [this message]
2005-09-26 20:02   ` [PATCH 2/7] aacraid: aacraid: AIF preallocation (update) Mark Haverkamp

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=1127659284.4839.1.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark_salyzyn@adaptec.com \
    --cc=markh@osdl.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