Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5596296pxu; Tue, 22 Dec 2020 23:59:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHx0EFdLPzXS12b5Uv9EjEp2jRRuo4Mpiwu5UqomjXVhtGZrUmGQy8ym1u0iyh5JmoGque X-Received: by 2002:a17:906:8587:: with SMTP id v7mr22559577ejx.381.1608710345621; Tue, 22 Dec 2020 23:59:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608710345; cv=none; d=google.com; s=arc-20160816; b=B7hoV7mW3QSFNiiyuJ1aauzXZD1tDBTKCOy9ZWuPZ2h2KXx7i/iIP/3Sg3T4ZPYSde W61UFXT5pDxUX0uSCnLJ0bb+7bx7Oxw0dBC34xMyJ5GO+lZKZ11KGX6d/ms6BMRCvXH3 /1UZ6rENcqAxzUZjhU4SFLD62F3HekrlJgM5ePbyd8sFXcePUhrnojqRS15gDSRiyjBe hb740jxxiyVziwujYljyL3hZUB2aZZ06SI2Y2F5oYxlPy6chLL7hP57ZRuGtxqER0F6a NHH2CMYZqjLCbyK33akmVVAbJM6ZvRBOKGjcd4w0cESLJxSU/gAXbAume0v07x96Fr1z VzFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Uj+JK7d0q0j/a4x+8YVsUuW+qb8H6aRAaZTSIOnE4wo=; b=lx95jOrozz+jOvazphOrJJ4LFeV+eqY9n1rAd8oa9KPqpjAfpE+wJdW+SPcYCM5MoU C8oa5OCuilvLmk1Kq3sczL7CLJnAWci/aXqulopOGSFTOFYCTPSopfjcu/XhhaAYafBP gk+7BDp4yrkSFNL9+wgGwYhZAN845rlaPuTfhD4fvuDQ/LNe31j+smhFOcHQ17MEFfL1 yvFvaR12s4oqrVyN4RjtA4YwtL4vm2pxt6y6BFt7DzPm/Woih/s42vvSYtgXK0VmBqtR ybNQbgcw3YA8nATkCCAXd8WEw6he2RNKkfyRaui2m3GMy77xFFpukcsIO+z+ptqvkpb0 zyWA== 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 sb9si12873960ejb.219.2020.12.22.23.58.43; Tue, 22 Dec 2020 23:59:05 -0800 (PST) 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 S1727670AbgLWH55 (ORCPT + 99 others); Wed, 23 Dec 2020 02:57:57 -0500 Received: from verein.lst.de ([213.95.11.211]:33687 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727372AbgLWH55 (ORCPT ); Wed, 23 Dec 2020 02:57:57 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 0958467373; Wed, 23 Dec 2020 08:57:12 +0100 (CET) Date: Wed, 23 Dec 2020 08:57:12 +0100 From: Christoph Hellwig To: Suren Baghdasaryan Cc: Christoph Hellwig , Jann Horn , Minchan Kim , Christoph Hellwig , Andrew Morton , Michal Hocko , Michal Hocko , David Rientjes , Matthew Wilcox , Johannes Weiner , Roman Gushchin , Rik van Riel , Christian Brauner , Oleg Nesterov , Tim Murray , Linux API , Linux-MM , kernel list , kernel-team Subject: Re: [PATCH 1/2] mm/madvise: allow process_madvise operations on entire memory range Message-ID: <20201223075712.GA4719@lst.de> References: <20201124053943.1684874-1-surenb@google.com> <20201124053943.1684874-2-surenb@google.com> <20201125231322.GF1484898@google.com> <20201222134438.GA7170@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 22, 2020 at 09:48:43AM -0800, Suren Baghdasaryan wrote: > Thanks for the feedback! The use case is userspace memory reaping > similar to oom-reaper. Detailed justification is here: > https://lore.kernel.org/linux-mm/20201124053943.1684874-1-surenb@google.com Given that this new variant of process_madvise a) does not work on an address range b) is destructive c) doesn't share much code at all with the rest of process_madvise Why not add a proper separate syscall?