From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934312Ab1ETDia (ORCPT ); Thu, 19 May 2011 23:38:30 -0400 Received: from mail-px0-f173.google.com ([209.85.212.173]:59895 "EHLO mail-px0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934258Ab1ETDi0 convert rfc822-to-8bit (ORCPT ); Thu, 19 May 2011 23:38:26 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=NFAvpnWHkwXecILxrymklAu++qfVxbPlW5SAS0DHBPUNO7vfEPqG5pw3h40KuiBRQr 9qgr4eZt/VoWkQF/hVJCpcizYEsvePb04kzAyQb2BLTeC3YcB6OE2ZQO8eOvs8FwAXwI dX+tUaxvlE6cCPLDs+0u7H/nFj1SgVLwpi62Y= MIME-Version: 1.0 In-Reply-To: <4DD5DC06.6010204@jp.fujitsu.com> References: <20110512054631.GI6008@one.firstfloor.org> <20110514165346.GV6008@one.firstfloor.org> <20110514174333.GW6008@one.firstfloor.org> <20110515152747.GA25905@localhost> <20110517060001.GC24069@localhost> <4DD5DC06.6010204@jp.fujitsu.com> From: Andrew Lutomirski Date: Thu, 19 May 2011 23:38:06 -0400 X-Google-Sender-Auth: JeJ6MPa3stddr_HDxcThUvhAmtw Message-ID: Subject: Re: Kernel falls apart under light memory pressure (i.e. linking vmlinux) To: KOSAKI Motohiro Cc: minchan.kim@gmail.com, kamezawa.hiroyu@jp.fujitsu.com, fengguang.wu@intel.com, andi@firstfloor.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, mgorman@suse.de, hannes@cmpxchg.org, riel@redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 19, 2011 at 11:12 PM, KOSAKI Motohiro wrote: >> Right after that happened, I hit ctrl-c to kill test_mempressure.sh. >> The system was OK until I typed sync, and then everything hung. >> >> I'm really confused.  shrink_inactive_list in >> RECLAIM_MODE_LUMPYRECLAIM will call one of the isolate_pages functions >> with ISOLATE_BOTH.  The resulting list goes into shrink_page_list, >> which does VM_BUG_ON(PageActive(page)). >> >> How is that supposed to work? > > Usually clear_active_flags() clear PG_active before calling > shrink_page_list(). > > shrink_inactive_list() >    isolate_pages_global() >    update_isolated_counts() >        clear_active_flags() >    shrink_page_list() > > That makes sense. And I have CONFIG_COMPACTION=y, so the lumpy mode doesn't get set anyway. But the pages I'm seeing have flags=100000000008005D. If I'm reading it right, that means locked,referenced,uptodate,dirty,active. How does a page like that end up in shrink_page_list? I don't see how a page that's !PageLRU can get marked Active. Nonetheless, I'm hitting that VM_BUG_ON. Is there a race somewhere? --Andy From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id 254326B0012 for ; Thu, 19 May 2011 23:38:28 -0400 (EDT) Received: by pzk4 with SMTP id 4so1957951pzk.14 for ; Thu, 19 May 2011 20:38:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4DD5DC06.6010204@jp.fujitsu.com> References: <20110512054631.GI6008@one.firstfloor.org> <20110514165346.GV6008@one.firstfloor.org> <20110514174333.GW6008@one.firstfloor.org> <20110515152747.GA25905@localhost> <20110517060001.GC24069@localhost> <4DD5DC06.6010204@jp.fujitsu.com> From: Andrew Lutomirski Date: Thu, 19 May 2011 23:38:06 -0400 Message-ID: Subject: Re: Kernel falls apart under light memory pressure (i.e. linking vmlinux) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: KOSAKI Motohiro Cc: minchan.kim@gmail.com, kamezawa.hiroyu@jp.fujitsu.com, fengguang.wu@intel.com, andi@firstfloor.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, mgorman@suse.de, hannes@cmpxchg.org, riel@redhat.com On Thu, May 19, 2011 at 11:12 PM, KOSAKI Motohiro wrote: >> Right after that happened, I hit ctrl-c to kill test_mempressure.sh. >> The system was OK until I typed sync, and then everything hung. >> >> I'm really confused. =A0shrink_inactive_list in >> RECLAIM_MODE_LUMPYRECLAIM will call one of the isolate_pages functions >> with ISOLATE_BOTH. =A0The resulting list goes into shrink_page_list, >> which does VM_BUG_ON(PageActive(page)). >> >> How is that supposed to work? > > Usually clear_active_flags() clear PG_active before calling > shrink_page_list(). > > shrink_inactive_list() > =A0 =A0isolate_pages_global() > =A0 =A0update_isolated_counts() > =A0 =A0 =A0 =A0clear_active_flags() > =A0 =A0shrink_page_list() > > That makes sense. And I have CONFIG_COMPACTION=3Dy, so the lumpy mode doesn't get set anyway. But the pages I'm seeing have flags=3D100000000008005D. If I'm reading it right, that means locked,referenced,uptodate,dirty,active. How does a page like that end up in shrink_page_list? I don't see how a page that's !PageLRU can get marked Active. Nonetheless, I'm hitting that VM_BUG_ON. Is there a race somewhere? --Andy -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org