Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755020AbYJPNyg (ORCPT ); Thu, 16 Oct 2008 09:54:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752115AbYJPNyZ (ORCPT ); Thu, 16 Oct 2008 09:54:25 -0400 Received: from mail0.lsil.com ([147.145.40.20]:42251 "EHLO mail0.lsil.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbYJPNyY convert rfc822-to-8bit (ORCPT ); Thu, 16 Oct 2008 09:54:24 -0400 From: "Yang, Bo" To: CaT , James Bottomley CC: Andrew Morton , "Patro, Sumant" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Kolli, Neela" , "Patro, Sumant" Date: Thu, 16 Oct 2008 07:54:07 -0600 Subject: RE: [PATCH 4/5] scsi: megaraid_sas - preallocate memory for ioctl processing Thread-Topic: [PATCH 4/5] scsi: megaraid_sas - preallocate memory for ioctl processing Thread-Index: AckvJJ2GhMeDaq1TR0+CSBa4qYJUXgAccc3Q Message-ID: <4B6A08C587958942AA3002690DD4F8C32D24DF36@cosmail02.lsi.com> In-Reply-To: <20081016001721.GW19077@zip.com.au> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3871 Lines: 88 What MegaCli cmds did you using (DCMD or DCDB?). Thanks, Bo Yang -----Original Message----- From: CaT [mailto:cat@zip.com.au] Sent: Wednesday, October 15, 2008 8:17 PM To: James Bottomley Cc: Andrew Morton; Patro, Sumant; linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Kolli, Neela; Yang, Bo; Patro, Sumant Subject: Re: [PATCH 4/5] scsi: megaraid_sas - preallocate memory for ioctl processing With hope that resurrecting a 1.5yr old thread is not a wrong thing to do... On Wed, Feb 07, 2007 at 05:02:13PM -0500, James Bottomley wrote: > On Wed, 2007-02-07 at 13:30 -0800, Andrew Morton wrote: > > I suspect all this horror is due to stupidity in the DMA API. > > > > pci_alloc_consistent() just goes and assumes GFP_ATOMIC, whereas > > the caller (megasas_mgmt_fw_ioctl) would have been perfectly happy > > to use GFP_KERNEL. > > > > I bet this fixes it > > It does, but the DMA API was expanded to cope with this exact case, so > use dma_alloc_coherent() directly in the megaraid code instead. The dev > is just &pci_dev->dev. I'm wondering if this was meant to lay this issue to rest. The reason being that I just got this error last night during a period of high disk and network IO (there was an over-the-network backup happening). dmesg gives: MegaCli: page allocation failure. order:0, mode:0x10d4 Call Trace: [] printk_ratelimit+0x15/0x20 [] __alloc_pages+0x2ff/0x320 [] dma_alloc_pages+0x20/0x90 [] dma_alloc_coherent+0x99/0x200 [] megasas_mgmt_ioctl_fw+0x1c9/0x450 [] megasas_mgmt_ioctl+0x28/0x40 [] do_ioctl+0x31/0x90 [] vfs_ioctl+0x73/0x2d0 [] sys_ioctl+0x4a/0x80 [] system_call+0x7e/0x83 Mem-info: DMA per-cpu: CPU 0: Hot: hi: 0, btch: 1 usd: 0 Cold: hi: 0, btch: 1 usd: 0 CPU 1: Hot: hi: 0, btch: 1 usd: 0 Cold: hi: 0, btch: 1 usd: 0 DMA32 per-cpu: CPU 0: Hot: hi: 186, btch: 31 usd: 128 Cold: hi: 62, btch: 15 usd: 14 CPU 1: Hot: hi: 186, btch: 31 usd: 183 Cold: hi: 62, btch: 15 usd: 59 Active:322989 inactive:1073 dirty:168 writeback:7 unstable:0 free:3894 slab:171815 mapped:3457 pagetables:4277 bounce:0 DMA free:6788kB min:16kB low:20kB high:24kB active:0kB inactive:0kB present:6148kB pages_scanned:0 all_unreclaimable? yes lowmem_reserve[]: 0 1988 1988 1988 DMA32 free:8788kB min:5692kB low:7112kB high:8536kB active:1291956kB inactive:4292kB present:2035720kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 DMA: 3*4kB 5*8kB 3*16kB 1*32kB 4*64kB 2*128kB 2*256kB 1*512kB 1*1024kB 0*2048kB 1*4096kB = 6788kB DMA32: 804*4kB 19*8kB 34*16kB 37*32kB 0*64kB 1*128kB 0*256kB 1*512kB 1*1024kB 1*2048kB 0*4096kB = 8808kB Swap cache: add 132711, delete 132711, find 496226/496957, race 0+0 Free swap = 979400kB Total swap = 979924kB Free swap: 979400kB 524200 pages of RAM 14486 reserved pages 93705 pages shared 0 pages swap cached megasas: Failed to alloc kernel SGL buffer for IOCTL MegaCli[18889]: segfault at 0000000000000000 rip 00000000004ab9b5 rsp 00007fff48802c30 error 4 I was attempting to get the state of the raid array (monitoring for downed drives, etc) with MegaCLI 2.00.11. This is with kernel 2.6.23.16. -- "Police noticed some rustling sounds from Linn's bottom area and on closer inspection a roll of cash was found protruding from Linn's anus, the full amount of cash taken in the robbery." - http://www.smh.com.au/news/world/robber-hides-loot-up-his-booty/2008/05/09/1210131248617.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/