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 3A4BFC43334 for ; Fri, 8 Jul 2022 20:47:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60CF96B0072; Fri, 8 Jul 2022 16:47:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 595236B0073; Fri, 8 Jul 2022 16:47:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 435796B0074; Fri, 8 Jul 2022 16:47:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 2FAE36B0072 for ; Fri, 8 Jul 2022 16:47:39 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 069EA20C36 for ; Fri, 8 Jul 2022 20:47:39 +0000 (UTC) X-FDA: 79665118638.18.CF8D27D Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 8277712005C for ; Fri, 8 Jul 2022 20:47:37 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 41004628D4; Fri, 8 Jul 2022 20:47:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6247AC341C6; Fri, 8 Jul 2022 20:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1657313254; bh=KzSCv6Zsb3M7HPF6wA9HGLpGFhr9oAvN/lNTeA1RqR4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NpOoScqZqoSti0BC+OzqVpjyd+RPDbEveYabgLqDNRIlinbbi5U5PMe7FteJJnp8M CZfxOu6cXgVw94lxKSvowVhg8S6drrOPGxYNMKUNfbIzYre+m5ZBJieyTJ5wFM1bsb kh/peKqAgscN7rovmtZ+RfJxK52SXN1LShqp3scw= Date: Fri, 8 Jul 2022 13:47:32 -0700 From: Andrew Morton To: "Zach O'Keefe" Cc: Alex Shi , David Hildenbrand , David Rientjes , Matthew Wilcox , Michal Hocko , Pasha Tatashin , Peter Xu , Rongwei Wang , SeongJae Park , Song Liu , Vlastimil Babka , Yang Shi , Zi Yan , linux-mm@kvack.org, Andrea Arcangeli , Arnd Bergmann , Axel Rasmussen , Chris Kennelly , Chris Zankel , Helge Deller , Hugh Dickins , Ivan Kokshaysky , "James E.J. Bottomley" , Jens Axboe , "Kirill A. Shutemov" , Matt Turner , Max Filippov , Miaohe Lin , Minchan Kim , Patrick Xia , Pavel Begunkov , Thomas Bogendoerfer Subject: Re: [mm-unstable v7 12/18] mm/madvise: add MADV_COLLAPSE to process_madvise() Message-Id: <20220708134732.fd9cc80739a3b9781a1ecf9e@linux-foundation.org> In-Reply-To: <20220706235936.2197195-13-zokeefe@google.com> References: <20220706235936.2197195-1-zokeefe@google.com> <20220706235936.2197195-13-zokeefe@google.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657313257; a=rsa-sha256; cv=none; b=CZd2o4iAmkiyatnWh66j1QnC/RY0ciGieN6lB2C+ZQSia+Aizver5GT+qsHFunjSaPt2iB m9rUb3IWS9GEyR08ueml41vKWssCM3aCxc6WL7h5P26OuWkJTKcTx1ftUJkF90p7lutTg1 2iF+12QjE21qOH1mn+HgQC1b5U95suA= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=NpOoScqZ; spf=pass (imf29.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657313257; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=NNVfryH0l/04L5GhnS9VxTN9Yp9XfqYF1W97Fjj/2bg=; b=PBje37lWSAMZGKwXphSSjlvr1jPWEJVYhUqy6Rnpi/mRsxxhyv9p4wihOzBq3ezGOCocc1 f7x0OInL7b9KGUx4/l41jmXo3mHQnRjx7svNT+L0bGEZa0RcDbD1Zx+mqnwfqcOyitgaMq Ub18jG70nDUoZFEfWh3HE8saNBex/cY= X-Rspamd-Server: rspam08 X-Rspam-User: Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=NpOoScqZ; spf=pass (imf29.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Stat-Signature: 93ty483pmy1ht4xrbg3sb7g8bmj7ixga X-Rspamd-Queue-Id: 8277712005C X-HE-Tag: 1657313257-556826 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, 6 Jul 2022 16:59:30 -0700 "Zach O'Keefe" wrote: > Allow MADV_COLLAPSE behavior for process_madvise(2) if caller has > CAP_SYS_ADMIN or is requesting collapse of it's own memory. This is maximally restrictive. I didn't see any discussion of why this was chosen either here of in the [0/N]. I expect that people will be coming after us to relax this. So please do add (a lot of) words explaining this decision, and describing what might be done in the future to relax it.