Received: by 10.223.185.116 with SMTP id b49csp7381030wrg; Thu, 1 Mar 2018 04:45:45 -0800 (PST) X-Google-Smtp-Source: AG47ELtV2RXRbIu0KhC/7U2YrJwvIA9o3HonyVeDI6MgW8KD6nl4sdtxpvVM3PnrC8g1MKBEWtP0 X-Received: by 2002:a17:902:4d:: with SMTP id 71-v6mr1825227pla.341.1519908345752; Thu, 01 Mar 2018 04:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519908345; cv=none; d=google.com; s=arc-20160816; b=eJuyAGZWvSlbXO7561LUAhdg9CqAM7vbE3SbeI9VLFGZAEM999L7dkoKhpdi8+Uagr o7TSj6S7joLLEd3m1ZNYsdaIUJy1baP5gbqJyxqIMqFqvZ09VuDBUHDJUtA3iSnD0D0n Jc7MdBaT/RWzQagMvNEhmM6KcbS4+ZALtI1rglaJ1ZlErQG0fuljsiOtUhk+fFBsZsKS SSkNto7HAJmEdh4Jp63SOckHoBbIyqfWJPbh57eEShb97WtdtQWp7EYqIqGBK1u+eemg GDfS5D31oVEe/wYCgKWhs27vZj4I11oT4n3GakG29nCEzXaHPVxHnlqu9xZW1H/Q4gHX bTFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=4Hb7H2e5g7vH0KMsFAEdlX+FOKT5yORFHRxkWCSPp24=; b=golJK8nHXCuwzrkx0VEXcwrZ64oGk4kbFRjBrcZ4t/fTC7tvV5rEsF8W44oxckJrAx TOV8DijHepzLTY+1/Lj1m19i02ezTRInjC0w40Ysyo7bCI/5c5cxSMS9UDCy42cz1iRk JqsF4bW37YhgDCYVKyrPd+ybQmxtBWQE53sjEnvUAdTpmlpwJGvy0C1VmBAqY4PgruDm +4PP4LoBj5Di4TXHlj+CX05+9KIlMwrfSLejP2iJGH4/IM6lbI+m8GgtBnVT96JEirI/ MVeNGR25cKRaHVkoAarlsPoRUBui9wtB5rtfAfUtDpGjuCM6zwzJPFAR2ZKydFdbKE5/ 5gWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=AoXhfwSK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13si2383531pgd.641.2018.03.01.04.45.30; Thu, 01 Mar 2018 04:45:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=AoXhfwSK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030470AbeCAMo0 (ORCPT + 99 others); Thu, 1 Mar 2018 07:44:26 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:37560 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030425AbeCAMoZ (ORCPT ); Thu, 1 Mar 2018 07:44:25 -0500 Received: by mail-wm0-f68.google.com with SMTP id 139so11424455wmn.2 for ; Thu, 01 Mar 2018 04:44:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4Hb7H2e5g7vH0KMsFAEdlX+FOKT5yORFHRxkWCSPp24=; b=AoXhfwSKGZBaczIC82oBNe3EwxyddRexDkHnbn22plyB4NNaGczUbcqUiBF4K43JXv kpvik6sebBh5BFL13BC9oiiMiRnncA1SphqZ19hUxJP4P9e1niiMqRlfEIBF6gfxmZnF M/YZhzMqOICKlh0yhrbgF/vxr+0IdIEFF66CqFXtqo/aA4CbdhYQSyXxapM+cHH5TgUC 50cVjDUnv5+Eepl81sDXNMbhYu8SwfxofrI0iFpTki6hB2z1M7B8G1O/wTKwESiRbvsM lZuZblFoPLIiSnpuYsF8uH+u8P0dr24KNMQejtVqZdvwQxklYVmM2h9VvcU+sKPHY2dU xoag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4Hb7H2e5g7vH0KMsFAEdlX+FOKT5yORFHRxkWCSPp24=; b=cm04eUmwrjZiOOuNLzRE8hsHzK4LKDk+j9ElwQyDxtbeMS0LPp7eU+k3+8263fSlkO D5PbIaZXSc5bHtw6fv1KaNfBWxHeNGE0bUgOk9rErChAqqw+n5YGc5cKvR9MdB6fJW1v gPdqLKrXr23OgXiQwCPu/ZyiIWYVO+EgpmGguqq/8zxE4qaSK/YqUzuKRn89+KHSMEXt zcHR0GGyIuyhdLTPcTYlgmWY9XLzgIXU8B0ACoytrOf35NyyMG7yM1Utcbh9/a8Ll4a5 2vG0Rfb1IRO+LLcDa+XV+a4Qo3Oikhd9ndgjXoxV8DJcOlNX/mYMPbq9XNn25SSwAgTj Xgfg== X-Gm-Message-State: APf1xPCDArh/Rrden0Yp7e30dBYfjfdTSRIdFSSCo3wzU7MP39CBSXj/ Ct/u/V22bwKv/S4u4s7HZL8ho/ZQ X-Received: by 10.80.184.23 with SMTP id j23mr2718050ede.5.1519908264278; Thu, 01 Mar 2018 04:44:24 -0800 (PST) Received: from node.shutemov.name ([178.121.199.127]) by smtp.gmail.com with ESMTPSA id x44sm3828815ede.7.2018.03.01.04.44.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 04:44:23 -0800 (PST) Received: by node.shutemov.name (Postfix, from userid 1000) id D721B648D520; Thu, 1 Mar 2018 15:44:12 +0300 (+03) Date: Thu, 1 Mar 2018 15:44:12 +0300 From: "Kirill A. Shutemov" To: Martin Schwidefsky Cc: Matthew Wilcox , linux-mm@kvack.org, Matthew Wilcox , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/4] Split page_type out from mapcount Message-ID: <20180301124412.gm6jxwzyfskzxspa@node.shutemov.name> References: <20180228223157.9281-1-willy@infradead.org> <20180301081750.42b135c3@mschwideX1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180301081750.42b135c3@mschwideX1> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 01, 2018 at 08:17:50AM +0100, Martin Schwidefsky wrote: > On Wed, 28 Feb 2018 14:31:53 -0800 > Matthew Wilcox wrote: > > > From: Matthew Wilcox > > > > I want to use the _mapcount field to record what a page is in use as. > > This can help with debugging and we can also expose that information to > > userspace through /proc/kpageflags to help diagnose memory usage (not > > included as part of this patch set). > > > > First, we need s390 to stop using _mapcount for its own purposes; > > Martin, I hope you have time to look at this patch. I must confess I > > don't quite understand what the different bits are used for in the upper > > nybble of the _mapcount, but I tried to replicate what you were doing > > faithfully. > > Yeah, that is a nasty bit of code. On s390 we have 2K page tables (pte) > but 4K pages. If we use full pages for the pte tables we waste 2K of > memory for each of the tables. So we allocate 4K and split it into two > 2K pieces. Now we have to keep track of the pieces to be able to free > them again. Have you considered to use slab for page table allocation instead? IIRC some architectures practice this already. -- Kirill A. Shutemov