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 89452C433FE for ; Wed, 1 Jun 2022 09:50:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D809A8D0005; Wed, 1 Jun 2022 05:50:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D2C2B8D0003; Wed, 1 Jun 2022 05:50:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1CDC8D0005; Wed, 1 Jun 2022 05:50:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B197F8D0003 for ; Wed, 1 Jun 2022 05:50:17 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 738B734ABE for ; Wed, 1 Jun 2022 09:50:17 +0000 (UTC) X-FDA: 79529196474.06.76D0BEB Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf04.hostedemail.com (Postfix) with ESMTP id D873A4005E for ; Wed, 1 Jun 2022 09:49:57 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 966AE21B31; Wed, 1 Jun 2022 09:50:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1654077015; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G6YCOoC6o4RKF3YC+uab9Of4H0v5zxGxkQCxnonpzIY=; b=XZcTS5F/Cp+Oqt+eWDX33aAriAcfv/pJcsQS9Qf1LvMin4YJqoaFDgSEi/zJQztRbULxjT yaGSezeSExTH0T2qW6Bm8S/zjyUOw9DASl3MYWvah5QS4bexCpS3GXjUvUPIfmQxgErzWW TsTnea8L+WguJtiYdOk70dkzieTIuXk= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id ECC0E2C142; Wed, 1 Jun 2022 09:50:14 +0000 (UTC) Date: Wed, 1 Jun 2022 11:50:14 +0200 From: Michal Hocko To: Yang Shi Cc: Zach O'Keefe , Alex Shi , David Hildenbrand , David Rientjes , Matthew Wilcox , Peter Xu , Song Liu , Linux MM , Rongwei Wang , 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-Stat-Signature: xkw9rd9k96u6ky1kfnunefc4cox8sitt X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b="XZcTS5F/"; spf=pass (imf04.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: D873A4005E X-HE-Tag: 1654076997-976527 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 Tue 31-05-22 16:47:49, Yang Shi wrote: > On Fri, May 27, 2022 at 2:46 AM Michal Hocko wrote: [...] > > I really do not see any good reason to tightly couple kernel and user > > policies. Hints like MADV_{NO}HUGEPAGE are one thing and both kernel > > and userspace might decide to interpret them. But binding MADV_COLLAPSE > > to in kernel THP tunables just seems like pushing ourselves into the > > corner. > > I don't mean we should tightly couple kernel and user policies. I > think it is about how "never" is treated. AFAICT, typically sys admins > tend to expect "never" as a global switch and they don't expect any > THP allocation should happen in "never" mode even though it is > requested by the users. Maybe they should not expect so in the first > place. But this is not how the knob works, right? At least shmem has its own thing. So we do not have any global kill switch for transparent huge pages. -- Michal Hocko SUSE Labs