Received: by 10.223.185.116 with SMTP id b49csp7519163wrg; Thu, 1 Mar 2018 06:52:05 -0800 (PST) X-Google-Smtp-Source: AG47ELv9TTzAyC6TetB4EwZ4o1Z9m5UaethGVvWtaXsYBSz6JbICBjB4pdUSVLOdmAnvBLpGcCME X-Received: by 2002:a17:902:b697:: with SMTP id c23-v6mr2170586pls.328.1519915925281; Thu, 01 Mar 2018 06:52:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519915925; cv=none; d=google.com; s=arc-20160816; b=mCnMoTfvGjJ4PNwOZzaKBd1nohmCqP44XXyYzZHCGLwO1jyqFBaUsRgWBL814iYZyj 7kshjc1sjaVk25W9z3R7CnqqkoNVLovhWAGJkdIYeUyuecf8S4YmepT8txdyEhasoclP Y8EosBbGn9POhr1sMjZmCuMpRrzhNNTt88qZGh/7+ebC0ToH8uWfVpeN0PGcBYMUxBL1 Qg6p6sJGUIHVRK8TigTMu79gyWkehTj5HLKd5CP/GE3KKpDsZ9F0GpHTkwz5pLFZSTp8 s5TNNjVnKA5dNBH5js9rSJtDe15N+sVtdlFrZ43SdWD2PynP9tbMD0SPvejKFlkjpROk 8mnw== 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=bn+KB95DMBQmpAdABpqIMxP5cwclplCdzj1z6t9gfEM=; b=xjGzLVOoDOoyQAjrfkAxjVv0boEwOFNCxZeR8FgqT2XqI72hVKnzGb1EQp0brTf03a OBEZrvdKGhHKv6PS1YYljqdesgk7790uB/5GlS14uv+uBraf5631pppp+jyUxFrS+spR Wf9MjxB45wXOfxXekMfuArCBdWC7C4sVodW7HaPdlsaINBsM1DZpWqihgOS6q9vstEPJ O/S6D0IGhSTSGUTLPeLtJZq1OK+eCQcCLX4NfmafOvxOIVGah/hSBSCdllrMHOVFJWin clGRAcIiq3GtV4850JNk2peE/W2LgihQAc75nRtLM4Y7lwqibewnse76jI94d0mj1iFz 4hMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=CH86i5cO; 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 o32-v6si3138390pld.768.2018.03.01.06.51.50; Thu, 01 Mar 2018 06:52:05 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=CH86i5cO; 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 S1031613AbeCAOvC (ORCPT + 99 others); Thu, 1 Mar 2018 09:51:02 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:46802 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031346AbeCAOvA (ORCPT ); Thu, 1 Mar 2018 09:51:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bn+KB95DMBQmpAdABpqIMxP5cwclplCdzj1z6t9gfEM=; b=CH86i5cOTLjJs8FcIqxEduYfC pSwqWsUKpLrbP8ZBqhQWYNpyU0EJY7Fhyg6QoqnRYt2T3758qwFMBpsgjgLiLT8vJPcIqdhCuIVVB Kbv8cyJtxlGIY0WYP9xzeqm6AwQEqovJvQljyNVAp1wF/EZOAQQ6fhhalb7HYvqWpqFYp2j4cFxyO TgzRqsbxj3L2MNImCDZ+ugXUTWdjpG24SJJ6X/LSgYyMtK+CIehpq4DN8xgIZNqv62U6xCb9jnEjh gOoxOPVDmqHlGbjKzzSxwAdE9ffGnSkwnP/2xtBGh94ppEnKy/A5LOPTRwJYzOwfeyH2qVO7VXko1 6NPXHak6g==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1erPXu-0007i1-LF; Thu, 01 Mar 2018 14:50:58 +0000 Date: Thu, 1 Mar 2018 06:50:58 -0800 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: Martin Schwidefsky , 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: <20180301145058.GA19662@bombadil.infradead.org> References: <20180228223157.9281-1-willy@infradead.org> <20180301081750.42b135c3@mschwideX1> <20180301124412.gm6jxwzyfskzxspa@node.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180301124412.gm6jxwzyfskzxspa@node.shutemov.name> User-Agent: Mutt/1.9.2 (2017-12-15) 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 03:44:12PM +0300, Kirill A. Shutemov wrote: > On Thu, Mar 01, 2018 at 08:17:50AM +0100, Martin Schwidefsky wrote: > > 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. You're not allowed to do that any more. Look at pgtable_page_ctor(), or rather ptlock_init().