From patchwork Mon Oct 15 16:42:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Schwidefsky X-Patchwork-Id: 10642183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C13F925 for ; Mon, 15 Oct 2018 16:43:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68AC1299C2 for ; Mon, 15 Oct 2018 16:43:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59A0529A7E; Mon, 15 Oct 2018 16:43:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7D78299C2 for ; Mon, 15 Oct 2018 16:43:00 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D96686B000A; Mon, 15 Oct 2018 12:42:59 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D48546B000C; Mon, 15 Oct 2018 12:42:59 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C12E56B000D; Mon, 15 Oct 2018 12:42:59 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-oi1-f199.google.com (mail-oi1-f199.google.com [209.85.167.199]) by kanga.kvack.org (Postfix) with ESMTP id 9626D6B000A for ; Mon, 15 Oct 2018 12:42:59 -0400 (EDT) Received: by mail-oi1-f199.google.com with SMTP id t68-v6so13710635oih.4 for ; Mon, 15 Oct 2018 09:42:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:content-transfer-encoding:mime-version; bh=d7pqOVYOsjS7Nj69sqpga6HIngfQ3ArqgNuhbLPSuyg=; b=C0cPH80Apb+simprRUlp2Ry8VqDk4Qdg4+zr1yaWGhZ78//mNvcerfRheZCJ5cPnC7 5cQsMXqXWMycDdfXoiU80Lf7sxePYc+5crrbFqujLqdqJLCxDz9ah+4puYWmIV5FS7ZS KCMOxeXF8rn3W1TogNtUBdZIUpRDCNukUdQ+YfssMWVWqQzYdG5r/wZOiZfvbv4qWAVn UA8YnbDiYUBo4GGPAGv9TVdyqDEHU6xh+vDXa+Dt5c6FpiUKro5AhPr7v8+A6KK5UkYF losHy9T08PMkFUipRKMnbanfCvKlXALbe1M8LVrb800Pj7eF7E2IgPZK3Ktzmm+mbXkI W4Xg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of schwidefsky@de.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=schwidefsky@de.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com X-Gm-Message-State: ABuFfoj8E9dU6mD2UNwLuASGp1VnlLT1lV+1GY3jmcrTP6KdaK3eQ7Lf L05GD5yXPSp0dxW7dK/LAYilCr81Qz6IuViR7Tp0Rc8q3oiRnYys89ZL8z2NNmgFJArnKn50dwP YYCzLb1NMaSIJiX7k2koEiqXQonxKMenYufYdNXA9MVGNgto+JjnkiEXYqxtr80w9dw== X-Received: by 2002:a9d:580b:: with SMTP id r11mr11089189oth.163.1539621779359; Mon, 15 Oct 2018 09:42:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV60HmM893FItSL+WmePMiIpqCb4JABCNrKdypbNtcrDzB8CXj8f9G+utR6i3kDOfcIcZ+vjW X-Received: by 2002:a9d:580b:: with SMTP id r11mr11089164oth.163.1539621778598; Mon, 15 Oct 2018 09:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539621778; cv=none; d=google.com; s=arc-20160816; b=I/NiCQl4C+tcOVOOQVvZcDXA9e391dTB0MWE8zcWV6FdNGeU9DuyNLKnQQ9PKGaOgt 0LRNaU2imkKu13qrzIXs4PBssEww9znK3FrBpjfqVt794i6J5eAkf5Uf4p6xa5CLwgF8 wWCDAdGuhsVg+cgJc+ufWnt6pxbbvvvLVsRUOUWHGuajWEm7oqZTidTMewqA+JIx5egW 5/HIH24JN6YHVtNTPeELNkoyHNB7MU882qTK0K5UVXwhEd0EJ4TQthMiknaj8+SPRNIq JbcvKmkscbQuWIwh7kbOFutbntrkVzX9L+NGy69vDaQx2nqv7EdNDOBWhkJg+mVSTpcu wX2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:message-id:date:subject:cc :to:from; bh=d7pqOVYOsjS7Nj69sqpga6HIngfQ3ArqgNuhbLPSuyg=; b=hHeUTPzCM+f15L5bCDCg9/4h1MDUhODtPC3xL142IdMv8ZnolM8qKeS5b2ZlnAMl6+ QxCSnF9v8ELyWfsIS3VT8c90QfDtDIK+iYAoNSEp5wRimD0zSnFJc9/uh5VrEGYNTRa2 RhfywujOBr61cftMWVBX2p008C5exPNHOCIw95Mla+v1h0szb9HhagVgLdnu76xMOE/n 6BsJtlTecaY2o7JbPWCbv6H3xLqK5xmmF0GJfDqxnh/j+1MPjs5yO5qByXH7LB9G1a1K dXl03DNJARNUiPQBy15sGNebJJFpDPdP3Az5Uza46RX5A/15zf2R6NVxcPWwQAJ/LNRX fC4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of schwidefsky@de.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=schwidefsky@de.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id m130-v6si5157827oif.194.2018.10.15.09.42.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 09:42:58 -0700 (PDT) Received-SPF: pass (google.com: domain of schwidefsky@de.ibm.com designates 148.163.156.1 as permitted sender) client-ip=148.163.156.1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of schwidefsky@de.ibm.com designates 148.163.156.1 as permitted sender) smtp.mailfrom=schwidefsky@de.ibm.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9FGegwv014594 for ; Mon, 15 Oct 2018 12:42:57 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2n4w9suyfu-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 15 Oct 2018 12:42:57 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 15 Oct 2018 17:42:54 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 15 Oct 2018 17:42:52 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9FGgpZY4784618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Oct 2018 16:42:51 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1D8742045; Mon, 15 Oct 2018 19:42:24 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A4994203F; Mon, 15 Oct 2018 19:42:24 +0100 (BST) Received: from mschwideX1.emea.ibm.com (unknown [9.145.33.55]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 15 Oct 2018 19:42:23 +0100 (BST) From: Martin Schwidefsky To: Li Wang , Guenter Roeck , Janosch Frank Cc: "Kirill A. Shutemov" , Heiko Carstens , linux-kernel , Linux-MM , Martin Schwidefsky Subject: [RFC][PATCH 0/3] pgtable bytes mis-accounting v2 Date: Mon, 15 Oct 2018 18:42:36 +0200 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 18101516-0012-0000-0000-000002B75873 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18101516-0013-0000-0000-000020EBC9DA Message-Id: <1539621759-5967-1-git-send-email-schwidefsky@de.ibm.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-15_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=603 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810150147 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Greetings, the first test patch to fix the pgtable_bytes mis-accounting on s390 still had a few problems. For one it didn't work for x86 .. Changes v1 -> v2: - Split the patch into three parts, one patch to add the mm_pxd_folded helpers, one patch to use to the helpers in mm_[dec|inc]_nr_[pmds|puds] and finally the fix for s390. - Drop the use of __is_defined, it does not work with the __PAGETABLE_PxD_FOLDED defines - Do not change the basic #ifdef'ery in mm.h, just add the calls to mm_pxd_folded to the pgtable_bytes accounting functions. This fixes the compile error on alpha (and potentially on other archs). Martin Schwidefsky (3): mm: introduce mm_[p4d|pud|pmd]_folded mm: add mm_pxd_folded checks to pgtable_bytes accounting functions s390/mm: fix mis-accounting of pgtable_bytes arch/s390/include/asm/mmu_context.h | 5 ---- arch/s390/include/asm/pgalloc.h | 6 ++--- arch/s390/include/asm/pgtable.h | 18 ++++++++++++++ arch/s390/include/asm/tlb.h | 6 ++--- include/linux/mm.h | 48 +++++++++++++++++++++++++++++++++++++ 5 files changed, 72 insertions(+), 11 deletions(-)