Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2153583imu; Sat, 5 Jan 2019 16:24:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQc7KoxOgiVBvClPau6oW9UI57g1d0qXGPURFZzFNNMIU8ljUpbhxWUUUf2Rw8FcF5EUa8 X-Received: by 2002:a62:ab0d:: with SMTP id p13mr57898082pff.211.1546734284484; Sat, 05 Jan 2019 16:24:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546734284; cv=none; d=google.com; s=arc-20160816; b=dP+cg+aRycF7KehyO3JuPRTDHQrI1KcF2gjxJqEktc/5lG1YkLbYIvFfb2V06pdqsK 2VbyZwvXA1k9keKwyU5NEeVG+9M5QKG0JUXuAFvZ/XNxEPTuh+QuRIT5yNEp6SJDS4r7 e2N4YC2t+WTiPJkEFC0mz3Rn0eokpFzLYeuVrHORGKpXg7yCsfbpTs+T1LK1Zre0VGDY hllcaCTrBSr4jmaZGnthn4DKG+zht4kef99e0V6uGHjxG49Vd4AtXD9nhmAgjKOEuogq jbXuteMSd6c+mUCEq4P1KwVcYm66vxe6OwWFFUVfZ6bVxhEi0h4b2LlR1LxyvwQMJOtF Bz2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=kXpC9nTs/Gy04v0woM2MVm7mCFE7zuhC308r47ayVvI=; b=byyByf6U76DYtsDYx31PNcjp0RNuGU0hdkYNiy1pNCQ8/7AbQOhtqwPA1EeBjXusWB b+bH9hJ1pU0wgPMV57RBs7GA9Gvqa/jYaf+fhLQ5Bf3s6FFcT8bz7tkxxv2i0JJnkKGP nu//SoUNHSDg8ISZIzf2YUy3Zhb61UajI7SM7Wy9KWti1iJo1jdyGaxgHkPfXNYjDmse jW/bp1h/XasrorRxi3ElHyTAxDBMb8qzGyhEyXJQ3gGwACnwSlxw+M3xvjNlIjft+1XZ /DrRPAaoJNBWYyYK/7aXlLMlDNmc3D7FJ3YRYQ37d7kaDPB/6wizromEakPK5r+XniTE kK2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DrY0B8uo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20si15350783pgv.159.2019.01.05.16.24.26; Sat, 05 Jan 2019 16:24:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=DrY0B8uo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726383AbfAFAXH (ORCPT + 99 others); Sat, 5 Jan 2019 19:23:07 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:38265 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbfAFAXH (ORCPT ); Sat, 5 Jan 2019 19:23:07 -0500 Received: by mail-lf1-f65.google.com with SMTP id a8so2757990lfk.5 for ; Sat, 05 Jan 2019 16:23:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kXpC9nTs/Gy04v0woM2MVm7mCFE7zuhC308r47ayVvI=; b=DrY0B8uoWPWa1RjKPnPb3r8ev+OuXLf3EnrQrWZahMYQCyQbAKLWGLn2KWWDqAEXra knZblOic5+lDI51aAoKR9myovivvtxrJVgamF860KwgWqLw4GasvfJyeM9V71Gqe0r5g PdmK2cJlGtOC5rpioE4BYhOVX6KAsN+xb79gw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kXpC9nTs/Gy04v0woM2MVm7mCFE7zuhC308r47ayVvI=; b=uIRQk5WlPxyUVe/hbSAq+JZMUGYwsROrR3xqaw3f8LeB9PeZ/RXzHqu3rWn+sJJ7NT GkqIEXdfFcEjSCWkKtnLFw6KN7+PdQMx6+OcLwKgiZ2mjdbZ3kVXqtE12mSZLrCxZyBK 9eGaxjMRVGl6Ozo73bjvkOxBsTz6XnB0z0VaefEN1jfDF2xpewGRwxy2lR6dcYiMLVgL cyHfgL/KAPGdO23js/IarErKE5So6ezm802+wNQhSO0RhDCeQZTwzIHdZ92eiJBNCsrx NJu9UDnwiFUjBlxgE65Y5X19H8s/h2SNZaYTATNQN9amogiOyiaue0GtQUOID5XaW/Mv HhYA== X-Gm-Message-State: AA+aEWZWeheKk+0F2o0rr1yxkjVQ11SX7Uoni1bEPtv+DtmKISzNIt0G lNobY0G+rC9nOiqcdU7XF9rM6iC3uMs= X-Received: by 2002:a19:518d:: with SMTP id g13mr27057141lfl.143.1546734184684; Sat, 05 Jan 2019 16:23:04 -0800 (PST) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com. [209.85.167.41]) by smtp.gmail.com with ESMTPSA id j18-v6sm13052338ljc.52.2019.01.05.16.23.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Jan 2019 16:23:03 -0800 (PST) Received: by mail-lf1-f41.google.com with SMTP id z13so27768002lfe.11 for ; Sat, 05 Jan 2019 16:23:03 -0800 (PST) X-Received: by 2002:a19:cbcc:: with SMTP id b195mr29443371lfg.117.1546734182916; Sat, 05 Jan 2019 16:23:02 -0800 (PST) MIME-Version: 1.0 References: <20190106001138.GW6310@bombadil.infradead.org> In-Reply-To: <20190106001138.GW6310@bombadil.infradead.org> From: Linus Torvalds Date: Sat, 5 Jan 2019 16:22:47 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/mincore: allow for making sys_mincore() privileged To: Matthew Wilcox Cc: Jann Horn , Jiri Kosina , Andrew Morton , Greg KH , Peter Zijlstra , Michal Hocko , Linux-MM , kernel list , Linux API Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 5, 2019 at 4:11 PM Matthew Wilcox wrote: > > FreeBSD claims to have a manpage from SunOS 4.1.3 with mincore (!) > > https://www.freebsd.org/cgi/man.cgi?query=mincore&apropos=0&sektion=0&manpath=SunOS+4.1.3&arch=default&format=html > > DESCRIPTION > mincore() returns the primary memory residency status of pages in the > address space covered by mappings in the range [addr, addr + len). It's still not clear that "primary memory residency status" actually means. Does it mean "mapped", or does it mean "exists in caches and doesn't need IO". I don't even know what kind of caches SunOS 4.1.3 had. The Linux implementation depends on the page cache, and wouldn't work (at least not very well) in a system that has a traditional disk buffer cache. Anyway, I guess it's mostly moot. From a "does this cause regressions" standpoint, the only thing that matters is really whatever Linux programs that have used this since it was introduced 18+ years ago. But I think my patch to just rip out all that page lookup, and just base it on the page table state has the fundamental advantage that it gets rid of code. Maybe I should jst commit it, and see if anything breaks? We do have options in case things break, and then we'd at least know who cares (and perhaps a lot more information of _why_ they care). Linus