Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp712773ybt; Wed, 1 Jul 2020 08:19:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzgw5eNm4c5AEyKuM9PCy0mwbfcb8AX5w21Som1pfFEWpd4NW0JE841tUEeTTO3PHYQLb7 X-Received: by 2002:a50:ee87:: with SMTP id f7mr30462243edr.355.1593616767308; Wed, 01 Jul 2020 08:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593616767; cv=none; d=google.com; s=arc-20160816; b=r3FOblj0/9EJgP35coDD3XB19qxgXU/5c/k79aiFmWjFQVUQEeqUGASTlYXuPKO8JS FFT0KG+xuOZv3/D1x0WYKJquq8zDACqMhDVC/HuFtgjiiVLwKtaH0NYGYFiTT3+tlkr5 VSkQVRKnYLzz2RbbAKJdfo3gA3TuCtg0GsqfNr0AUZa2MLrJo5svz9cI0NKMG5bX4FcG 0vbSkJ7NjE6GWCaXpvdqM8pL9AjeoV/V9PbDvCxfEXHrL2UBArnys+SM67x3HoIeVvQu ZPlcrjED8IiR/14+JGJ+uKgrouh++70xJeapaNOPE9cjJZ5ggx6ULTd1MZWN8ADMpuXq wSww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=42PHXSqUsrIbGbe6JmlCqHZlGrKucB4TsPeeRfFCE+o=; b=zuG7n50Bd4nrKZCDS/8qT/CylTYbOJLnj/LPTWWAp3ieC/ULturzVxmEPKQFO1hJO0 IFLcnjQqzSWN8BeDEoFwvRNBCPQpfHsuRbJ79ApSpcBjFBm+KXVV05E5JqMbKy3LbE8u H0YtuDwA9jEUryyB+XrAu2oAKKE18BYykrv20lzyULNaiK3BgVvz8AeIGd99mBMsDlbl e/RF3bjwwWnG+2sgsHCAcDhTSAT7rgAX30JJdOyMVCwtYYoIQs9ZdJwpZpKD5lmpAfeF JFcE11b3x5YI2hBpEFchgMCGXFH5zgmt7/lRiHP82yV7YAe9gWjs6Qzrlv5thMRlgF66 +H1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g21si4377419ejr.275.2020.07.01.08.19.03; Wed, 01 Jul 2020 08:19:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731794AbgGAPSz (ORCPT + 99 others); Wed, 1 Jul 2020 11:18:55 -0400 Received: from gentwo.org ([3.19.106.255]:55976 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731765AbgGAPSy (ORCPT ); Wed, 1 Jul 2020 11:18:54 -0400 Received: by gentwo.org (Postfix, from userid 1002) id ACE303F059; Wed, 1 Jul 2020 15:18:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id AAD543F057; Wed, 1 Jul 2020 15:18:53 +0000 (UTC) Date: Wed, 1 Jul 2020 15:18:53 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Matthew Wilcox cc: Long Li , penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] mm:free unused pages in kmalloc_order In-Reply-To: <20200629145259.GD25523@casper.infradead.org> Message-ID: References: <20200627045507.GA57675@lilong> <20200629145259.GD25523@casper.infradead.org> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 29 Jun 2020, Matthew Wilcox wrote: > Sounds like we need a test somewhere that checks this behaviour. > > > In order to make such allocations possible one would have to create yet > > another kmalloc array for high memory. > > Not for this case because it goes straight to kmalloc_order(). What does > make this particular case impossible is that we can't kmap() a compound > page. We could vmap it, but why are we bothering? Well yes it will work if the slab allocator falls back to the page allocator. Higher order allocation through kmalloc ;-). How much fun and uselessness .... Why not call the page allocator directly and play with all the bits you want? Any regular small object allocation with GFP_HIGH will lead to strange effects if the bit is not checked.