From: Patrick Mansfield <patmans@us.ibm.com>
To: linux-scsi@vger.kernel.org
Subject: Re: GFP_ATOMIC allocations...
Date: Wed, 28 Aug 2002 17:47:37 -0700 [thread overview]
Message-ID: <20020828174737.A27554@eng2.beaverton.ibm.com> (raw)
In-Reply-To: <20020828202534.G30927@redhat.com>; from dledford@redhat.com on Wed, Aug 28, 2002 at 08:25:34PM -0400
On Wed, Aug 28, 2002 at 08:25:34PM -0400, Doug Ledford wrote:
> I'm looking through some of the new code that has been put in the kernel
> scsi subsystem lately and I'm seeing a few of the same mistakes that the
> old code made. So, I'm pointing out one of them here. There are lots of
> places in the SCSI mid layer that are called outside of any spinlocks and
> not from interrupt context where there is absolutely no need to use
> GFP_ATOMIC allocations for memory. In general, if you don't need to use
> GFP_ATOMIC, then don't use it. You're more likely to fail the allocation
> and therefore fail the operation. So, if you are working on a section of
> code, please think about this when doing allocations and do whatever is
> right for the code snippet you are currently hacking. Fixing places in
> the existing code that use GFP_ATOMIC needlessly is a plus ;-)
So, you think all (or most) of the GFP_ATOMIC's in scsi_scan.c should
be GFP_KERNEL? All the kmalloc calls should be at boot time, or via
insmod.
I was wondering about them, but left them to match the previous
scsi_scan.c code.
Do GFP_KERNEL alloc failures during boot time just return NULL?
(Given that there is really no memory left.) I'd hope so, but was
never sure.
I suppose I could change them and boot with mem=something-low and
see what happens.
-- Patrick
next prev parent reply other threads:[~2002-08-29 0:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-29 0:25 GFP_ATOMIC allocations Doug Ledford
2002-08-29 0:47 ` Patrick Mansfield [this message]
2002-08-29 1:42 ` Doug Ledford
2002-08-29 10:47 ` Alan Cox
2002-08-29 15:58 ` Doug Ledford
2002-08-29 17:10 ` Patrick Mansfield
2002-08-30 16:22 ` Patrick Mansfield
2002-08-30 16:46 ` James Bottomley
2002-08-30 18:58 ` Doug Ledford
2002-08-30 21:55 ` [PATCH] " Patrick Mansfield
2002-09-03 14:57 ` James Bottomley
2002-09-03 16:07 ` Pete Zaitcev
-- strict thread matches above, loose matches on Subject: below --
2002-08-29 15:59 Bryan Henderson
2002-08-29 16:25 ` Doug Ledford
2002-08-29 16:50 ` Alan Cox
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=20020828174737.A27554@eng2.beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=linux-scsi@vger.kernel.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