public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Martin Peschke <mp3@de.ibm.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [Patch] cleanup: GFP_ATOMIC to GFP_KERNEL in scsi_scan.c
Date: Tue, 22 Aug 2006 11:43:19 +0200	[thread overview]
Message-ID: <44EAD1B7.1010505@s5r6.in-berlin.de> (raw)
In-Reply-To: <1156187273.2924.12.camel@dyn-9-152-230-71.boeblingen.de.ibm.com>

Martin Peschke wrote:
> It seems to be safe to replace all 4 occurrences of GFP_ATOMIC in
> scsi_scan.c by GFP_KERNEL. I found that calling code always held a mutex
> (indicating process context) while not acquiring a spin_lock or such
> inside the mutex sections and when using GFP_ATOMIC (see details below).

Please use diff's -p option for postings like this.

Did you check Documentation/scsi/scsi_mid_low_api.txt with respect to
the detailed description of all exported functions which you modify? All
of them should contain a remark like "Might block: yes" or something
else in the way of "do not call in atomic context". Although I suppose
that all or most of them do so already.

If scsi_mid_low_api.txt does not fully reflect what your patch imposes,
please modify scsi_mid_low_api.txt in the same patch.

> http://marc.theaimsgroup.com/?l=linux-scsi&m=115522223917634&w=2
> indicates that these occurrences of GFP_ATOMIC are just there for
> historical reasons.
> 
> Patch ist against 2.6.18-rc4-mm2. Please consider applying this cleanup.
> It didn't break my test machine with 3 SCSI disks attached.
[...]

You need to make sure that it does not break _any_ caller. (SCSI is more
than the bundle of interconnect drivers for SPI hardware.) Also take
precautions for future callers or future changes to current callers.
-- 
Stefan Richter
-=====-=-==- =--- =-==-
http://arcgraph.de/sr/

  reply	other threads:[~2006-08-22  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21 19:07 [Patch] cleanup: GFP_ATOMIC to GFP_KERNEL in scsi_scan.c Martin Peschke
2006-08-22  9:43 ` Stefan Richter [this message]
2006-08-22 15:44   ` Martin Peschke
2006-08-22 20:26     ` Stefan Richter

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=44EAD1B7.1010505@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mp3@de.ibm.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