From patchwork Sat Jan 24 05:52:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 5698751 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 704DC9F302 for ; Sat, 24 Jan 2015 05:52:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 823EA202F2 for ; Sat, 24 Jan 2015 05:52:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8347F202E6 for ; Sat, 24 Jan 2015 05:52:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752679AbbAXFwg (ORCPT ); Sat, 24 Jan 2015 00:52:36 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:41056 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751279AbbAXFwd (ORCPT ); Sat, 24 Jan 2015 00:52:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=gseE2GPp22tf7OeoEKp5U09wusOecuo3k40nFH6ASNs=; b=j4fJL841RBuc8SAQNMciJKdihxJx8bScB/wQqp537vPTOMNM8C2bQ+TqoH+7JLpCxkRwDQpjW6Zmw+eARGr++spC/EQm3L+M+0N+avRxy9wiVFj0fPeUpCcHR6crtvAgeBexUwXdJSaYvqY8igrvhvqygXofSNbeWR8neSQ24UM=; Received: from mailnull by bh-25.webhostbox.net with sa-checked (Exim 4.82) (envelope-from ) id 1YEte5-003zTw-VR for linux-fsdevel@vger.kernel.org; Sat, 24 Jan 2015 05:52:34 +0000 Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:60591 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.82) (envelope-from ) id 1YEtdm-003zFz-5c; Sat, 24 Jan 2015 05:52:16 +0000 Date: Fri, 23 Jan 2015 21:52:07 -0800 From: Guenter Roeck To: Andrew Morton Cc: "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-next@vger.kernel.org, sfr@canb.auug.org.au, mhocko@suse.cz, "Kirill A. Shutemov" Subject: Re: mmotm 2015-01-22-15-04: qemu failures due to 'mm: account pmd page tables to the process' Message-ID: <20150124055207.GA8926@roeck-us.net> References: <54c1822d.RtdGfWPekQVAw8Ly%akpm@linux-foundation.org> <20150123050445.GA22751@roeck-us.net> <20150123111304.GA5975@node.dhcp.inet.fi> <54C263CC.1060904@roeck-us.net> <20150123135519.9f1061caf875f41f89298d59@linux-foundation.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150123135519.9f1061caf875f41f89298d59@linux-foundation.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, WEIRD_PORT autolearn=unavailable version=3.3.1 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020202.54C33321.0070, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-Score: 0.001 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: C_4847, X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 5 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jan 23, 2015 at 01:55:19PM -0800, Andrew Morton wrote: > On Fri, 23 Jan 2015 07:07:56 -0800 Guenter Roeck wrote: > > > >> > > >> qemu:microblaze generates warnings to the console. > > >> > > >> WARNING: CPU: 0 PID: 32 at mm/mmap.c:2858 exit_mmap+0x184/0x1a4() > > >> > > >> with various call stacks. See > > >> http://server.roeck-us.net:8010/builders/qemu-microblaze-mmotm/builds/15/steps/qemubuildcommand/logs/stdio > > >> for details. > > > > > > Could you try patch below? Completely untested. > > > > > >>From b584bb8d493794f67484c0b57c161d61c02599bc Mon Sep 17 00:00:00 2001 > > > From: "Kirill A. Shutemov" > > > Date: Fri, 23 Jan 2015 13:08:26 +0200 > > > Subject: [PATCH] microblaze: define __PAGETABLE_PMD_FOLDED > > > > > > Microblaze uses custom implementation of PMD folding, but doesn't define > > > __PAGETABLE_PMD_FOLDED, which generic code expects to see. Let's fix it. > > > > > > Defining __PAGETABLE_PMD_FOLDED will drop out unused __pmd_alloc(). > > > It also fixes problems with recently-introduced pmd accounting. > > > > > > Signed-off-by: Kirill A. Shutemov > > > Reported-by: Guenter Roeck > > > > Tested working. > > > > Tested-by: Guenter Roeck > > > > Any idea how to fix the sh problem ? > > Can you tell us more about it? All I'm seeing is "qemu:sh fails to > shut down", which isn't very clear. Turns out that the include file defining __PAGETABLE_PMD_FOLDED was not always included where used, resulting in a messed up mm_struct. The patch below fixes the problem for the sh architecture. No idea if the patch is correct/acceptable for other architectures. Guenter --- >From 2a11491a5d0642c924db1d78f2b8f21985459062 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Fri, 23 Jan 2015 21:44:06 -0800 Subject: [PATCH] mm_types: include asm/pgtable.h Commit 22310c209483 ("mm: account pmd page tables to the process") starts using __PAGETABLE_PMD_FOLDED in mm_types.h. This define is usually declared in pgtable.h, so pgtable.h neeeds to be included. Fixes runtime error with sh targets. Fixes: 22310c209483 ("mm: account pmd page tables to the process") Signed-off-by: Guenter Roeck --- include/linux/mm_types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 79cdf6f..65db573 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #ifndef AT_VECTOR_SIZE_ARCH