From: "Martin J. Bligh" <mbligh@mbligh.org>
To: Andi Kleen <ak@muc.de>
Cc: James Washer <washer@trlp.com>,
marcelo.tosatti@cyclades.com, linux-mm@kvack.org,
James Bottomley <James.Bottomley@SteelEye.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Question about OOM-Killer
Date: Tue, 26 Jul 2005 09:34:15 -0700 [thread overview]
Message-ID: <19000000.1122395655@[10.10.2.4]> (raw)
In-Reply-To: <20050726151754.GA9691@muc.de>
--Andi Kleen <ak@muc.de> wrote (on Tuesday, July 26, 2005 17:17:54 +0200):
>> But that's really for ISA DMA, which nobody uses any more apart from the
>> floppy disk, and the stone-tablet adaptor. For now, I'm guessing that if
>> you remove that __GFP_DMA, your machine will be happier, but it's not
>> the right fix.
>
> iirc the reason for that was that someone could load an old ISA SCSI controller
> later as a module and it needs to handle that. Perhaps make it dependent
> on CONFIG_ISA ? But even that would not help on distribution kernels.
> Another way would be to check in PCI systems if there is a ISA
> bridge and for others assume ISA is there.
Yeah, the CONFIG_ISA thing makes a lot of sense to me ... however, would
be even better if we can work out (easily) what the disk is attatched to.
Pah, ISA is so shit. Generically, might be useful if we had a
__GFP_DMA_IF_ISA or something defined in the header files, rather than
just shoving ifdef's all over the place.
OTOH, Jim is right ... the OOM killer is being somewhat psycopathic. Seems
we need 2 fixes ;-)
M.
PS. Warning, this is wholly untested, and generally a bit shit.
PPS. jejb ... your mail bounces.
diff -aurpN -X /home/fletch/.diff.exclude virgin/drivers/scsi/sd.c isa_dma/drivers/scsi/sd.c
--- virgin/drivers/scsi/sd.c 2005-07-26 09:25:40.000000000 -0700
+++ isa_dma/drivers/scsi/sd.c 2005-07-26 09:32:05.000000000 -0700
@@ -1468,7 +1468,7 @@ static int sd_revalidate_disk(struct gen
goto out;
}
- buffer = kmalloc(512, GFP_KERNEL | __GFP_DMA);
+ buffer = kmalloc(512, GFP_KERNEL | __GFP_DMA_IF_ISA);
if (!buffer) {
printk(KERN_WARNING "(sd_revalidate_disk:) Memory allocation "
"failure.\n");
diff -aurpN -X /home/fletch/.diff.exclude virgin/include/linux/gfp.h isa_dma/include/linux/gfp.h
--- virgin/include/linux/gfp.h 2005-07-26 09:26:02.000000000 -0700
+++ isa_dma/include/linux/gfp.h 2005-07-26 09:29:38.000000000 -0700
@@ -13,6 +13,11 @@ struct vm_area_struct;
*/
/* Zone modifiers in GFP_ZONEMASK (see linux/mmzone.h - low two bits) */
#define __GFP_DMA 0x01
+#ifdef CONFIG_ISA
+ #define __GFP_DMA_IF_ISA __GFP_DMA
+#else
+ #define __GFP_DMA_IF_ISA 0
+#endif
#define __GFP_HIGHMEM 0x02
/*
--
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>
next prev parent reply other threads:[~2005-07-26 16:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-18 19:21 James Washer
2005-07-18 19:36 ` James Washer
2005-07-23 13:00 ` Marcelo Tosatti
2005-07-25 19:11 ` James Washer
2005-07-25 12:27 ` Marcelo Tosatti
2005-07-25 22:41 ` Martin J. Bligh
2005-07-25 15:46 ` Marcelo Tosatti
2005-07-26 0:35 ` James Washer
2005-07-25 17:10 ` Marcelo Tosatti
2005-07-26 13:29 ` Martin J. Bligh
2005-07-26 15:17 ` Andi Kleen
2005-07-26 16:34 ` Martin J. Bligh [this message]
2005-07-26 13:53 ` Andi Kleen
2023-05-31 8:42 Question about oom-killer Gou Hao
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='19000000.1122395655@[10.10.2.4]' \
--to=mbligh@mbligh.org \
--cc=James.Bottomley@SteelEye.com \
--cc=ak@muc.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=washer@trlp.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