The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Satyam Sharma <satyam.sharma@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Robert P. J. Day" <rpjday@mindspring.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time?
Date: Tue, 01 May 2007 00:42:35 +0200	[thread overview]
Message-ID: <463670DB.9090003@s5r6.in-berlin.de> (raw)
In-Reply-To: <a781481a0704301204i247a5123r1e6146c99b2e467e@mail.gmail.com>

Satyam Sharma wrote:
> On 4/30/07, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> i2o/device.c should be GFP_KERNEL as far as I can tell. It was meant to
>> be that way and the callers appear to all be calling it in sleep capable
>> contexts.
>>
>> aic7xxx_old.c should probably be GFP_KERNEL as ->slave_alloc methods
>> appear to be able to sleep (although some drivers use GFP_ATOMIC here and
>> some GFP_KERNEL).
> 
> Yes, none of the above appear to be atomic contexts. GFP_KERNEL in
> that case would've been a bug. If they were atomic contexts, someone
> somewhere would've been seeing a lot of "BUG: sleeping function called
> from invalid context" messages and would've probably brought it to
> lkml's notice already ;-) So the GFP_ATOMIC seems to be redundant
> thing here in both cases.

Documentation/scsi/scsi_mid_low_api.txt agrees that ->slave_alloc is
allowed to sleep.
-- 
Stefan Richter
-=====-=-=== -=-= ----=
http://arcgraph.de/sr/

  reply	other threads:[~2007-04-30 22:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-28 13:40 can a kmalloc be both GFP_ATOMIC and GFP_KERNEL at the same time? Robert P. J. Day
2007-04-30  7:13 ` Andrew Morton
2007-04-30  8:46   ` Robert P. J. Day
2007-04-30  8:56     ` Jan Engelhardt
2007-04-30  9:52       ` Robert P. J. Day
2007-04-30 12:00         ` Satyam Sharma
2007-04-30 17:02     ` Andrew Morton
2007-04-30 17:21       ` Alan Cox
2007-04-30 19:04         ` Satyam Sharma
2007-04-30 22:42           ` Stefan Richter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-04-28 13:58 Shan, Guo Wen (Gavin)
2007-04-28 14:11 ` Robert P. J. Day
2007-04-28 15:03   ` Arjan van de Ven
2007-04-28 15:20     ` WANG Cong
2007-04-28 16:29   ` Alan Cox
2007-04-30  5:58     ` Christoph Lameter

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=463670DB.9090003@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpjday@mindspring.com \
    --cc=satyam.sharma@gmail.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