From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0346C433F5 for ; Thu, 26 May 2022 18:30:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49E7C8D0003; Thu, 26 May 2022 14:30:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4262E8D0002; Thu, 26 May 2022 14:30:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EBC98D0003; Thu, 26 May 2022 14:30:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 1BF8B8D0002 for ; Thu, 26 May 2022 14:30:38 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E2F0134F30 for ; Thu, 26 May 2022 18:30:37 +0000 (UTC) X-FDA: 79508734914.23.7C9B469 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf08.hostedemail.com (Postfix) with ESMTP id CADFD1600D5 for ; Thu, 26 May 2022 18:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=vFmitLAucer9L5dSZvM+ZbTsyOrplIVtmjlEL227Btk=; b=Ef98K1d+tQHD1Q7dZOh2mv74fQ DcQMM1VMdrv8KH5QzMxI666jTVmiEvnH6daXBNfpvwDJvKzLeiZ1/MkqsmL5Qt1ufyjsftguak3wK Gc9NMdAEta5NFUfU+xL0m4M37xQvjN3AC2jA3O0wpJQo4itgoUA0g+c2cdrwUa8SmswpWuIz38zuZ RST/gm8WP/ghd22cItL5VhgUGYeY2iiDY2p5p3rZ/JyXmZJlOmnJwE/hkVww+USoSNizkf08OX3YL hYgr0qJHAVpEqfqBeW2/cY3qCzqx/Mxd7QRVg8LShj0l/5Ekz8JOOyEUisCfaPZd87xVpvPoFJDYc AnRfICSA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuIFY-001SQJ-9w; Thu, 26 May 2022 18:30:20 +0000 Date: Thu, 26 May 2022 19:30:20 +0100 From: Matthew Wilcox To: Michal Hocko Cc: Zach O'Keefe , Alex Shi , David Hildenbrand , David Rientjes , Peter Xu , Song Liu , Yang Shi , linux-mm@kvack.org, rongwei.wang@linux.alibaba.com, Andrea Arcangeli , Axel Rasmussen , Hugh Dickins , "Kirill A. Shutemov" , Minchan Kim , SeongJae Park , Pasha Tatashin Subject: Re: [RFC] mm: MADV_COLLAPSE semantics Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: CADFD1600D5 X-Stat-Signature: uw3xxwha47tmhn8cmspikh1qm61tyc7t X-Rspam-User: Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=Ef98K1d+; spf=none (imf08.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1653589812-967038 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: On Wed, May 25, 2022 at 10:24:55AM +0200, Michal Hocko wrote: > I am not so sure about the global "never" policy, though. The global > policy controls _kernel_ driven THPs. As the request to collapse memory > comes from the userspace I do not think it should be limited by the > kernel policy. I also think it can be beneficial to implement userspace > based THP policies and exclude any kernel interference and that could be > achieved by global kernel "never" policy and implement the whole > functionality by process_madvise. I'd prefer to see "never" mean "Don't run khugepaged" rather than "Do not create THPs". If the app explicitly asks for a THP, I think it should get one, regardless of the sysadmin's will. Death to tunables. Can we just delete /sys/kernel/mm/transparent_hugepage/shmem_enabled entirely?