Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750815Ab3HSENS (ORCPT ); Mon, 19 Aug 2013 00:13:18 -0400 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:41142 "EHLO e23smtp02.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732Ab3HSENR (ORCPT ); Mon, 19 Aug 2013 00:13:17 -0400 Message-ID: <52119B4E.4060409@linux.vnet.ibm.com> Date: Mon, 19 Aug 2013 12:13:02 +0800 From: Michael wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: Mitch Harder CC: Linux Kernel Mailing List , Greg Kroah-Hartman , Minchan Kim , Jiang Liu , Nitin Gupta , Jerome Marchand , devel@driverdev.osuosl.org Subject: Re: BUG: scheduling while atomic 3.10.7 in ZRAM Swap References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13081904-5490-0000-0000-000004015D73 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3782 Lines: 83 Hi, Mitch On 08/17/2013 10:01 PM, Mitch Harder wrote: > I'm encountering a BUG while using a ZRAM Swap device. > > The call trace seems to involve the changes recently added to 3.10.6 > by the patch: > zram: use zram->lock to protect zram_free_page() in swap free notify path > > The hardware is a x86 single CPU AMD Athlon XP system with 1GB RAM. > > I'm implementing a 352MB ZRAM swap device, and also have 1GB swap > space on the hard disk. IMHO, it was caused by that swap_entry_free() was invoked with page spin-locked, thus zram_slot_free_notify() should not use rw-lock which may goto sleep. CC folks related. Regards, Michael Wang > > The log include multiple messages similar to the following: > > [ 3019.011511] BUG: scheduling while atomic: cc1/23223/0x00000001 > [ 3019.011517] Modules linked in: zram(C) nvidia(PO) nvidia_agp > i2c_nforce2 xts gf128mul sha256_generic > [ 3019.011528] CPU: 0 PID: 23223 Comm: cc1 Tainted: P C O 3.10.7-std #1 > [ 3019.011531] Hardware name: /MS-6570, BIOS 6.00 PG 03/29/2004 > [ 3019.011534] f18d0c88 f18d0c88 e8673d30 c1859479 e8673d48 c1853a6d > c1a11f18 f4f1b79c > [ 3019.011539] 00005ab7 00000001 e8673dc8 c185e9dd e8673d60 c11130f0 > f6298e00 00000000 > [ 3019.011543] c1b61b40 c10d8c40 f4f1b4f0 00001000 f4f1b4f0 00000001 > e8673d8c c10250ac > [ 3019.011548] Call Trace: > [ 3019.011561] [] dump_stack+0x16/0x18 > [ 3019.011566] [] __schedule_bug+0x4e/0x5c > [ 3019.011573] [] __schedule+0x4fd/0x5a0 > [ 3019.011580] [] ? bio_put+0x40/0x70 > [ 3019.011586] [] ? end_swap_bio_read+0x30/0x80 > [ 3019.011593] [] ? kmap_atomic_prot+0x4c/0xd0 > [ 3019.011597] [] ? kmap_atomic+0x13/0x20 > [ 3019.011604] [] ? get_page_from_freelist+0x278/0x500 > [ 3019.011609] [] schedule+0x22/0x60 > [ 3019.011613] [] rwsem_down_write_failed+0x95/0x110 > [ 3019.011618] [] call_rwsem_down_write_failed+0x6/0x8 > [ 3019.011623] [] ? zram_free_page+0xb0/0xb0 [zram] > [ 3019.011627] [] ? down_write+0x24/0x30 > [ 3019.011630] [] zram_slot_free_notify+0x29/0x50 [zram] > [ 3019.011635] [] swap_entry_free+0xe4/0x140 > [ 3019.011639] [] swapcache_free+0x28/0x40 > [ 3019.011643] [] delete_from_swap_cache+0x26/0x40 > [ 3019.011646] [] reuse_swap_page+0x6e/0x80 > [ 3019.011652] [] do_wp_page.isra.84+0x225/0x5c0 > [ 3019.011656] [] ? lru_cache_add_lru+0x22/0x40 > [ 3019.011662] [] ? page_add_new_anon_rmap+0x5c/0xa0 > [ 3019.011666] [] handle_pte_fault+0x2db/0x5e0 > [ 3019.011669] [] handle_mm_fault+0x87/0xd0 > [ 3019.011674] [] ? __do_page_fault+0x480/0x480 > [ 3019.011677] [] __do_page_fault+0x178/0x480 > [ 3019.011683] [] ? __do_softirq+0x10f/0x1e0 > [ 3019.011691] [] ? handle_level_irq+0x58/0x90 > [ 3019.011695] [] ? irq_exit+0x54/0x90 > [ 3019.011700] [] ? do_IRQ+0x48/0x94 > [ 3019.011706] [] ? SyS_write+0x57/0xa0 > [ 3019.011710] [] ? __do_page_fault+0x480/0x480 > [ 3019.011713] [] do_page_fault+0xd/0x10 > [ 3019.011717] [] error_code+0x65/0x6c > -- > 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/ > -- 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/