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 X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD25AC433C1 for ; Wed, 24 Mar 2021 20:22:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 883C1619B8 for ; Wed, 24 Mar 2021 20:22:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 883C1619B8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shipmail.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 157016B0314; Wed, 24 Mar 2021 16:22:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 12EE66B0316; Wed, 24 Mar 2021 16:22:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F11376B0317; Wed, 24 Mar 2021 16:22:24 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id D6C0A6B0314 for ; Wed, 24 Mar 2021 16:22:24 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 972CC18026B3F for ; Wed, 24 Mar 2021 20:22:24 +0000 (UTC) X-FDA: 77955890208.22.846A6C2 Received: from ste-pvt-msa2.bahnhof.se (ste-pvt-msa2.bahnhof.se [213.80.101.71]) by imf24.hostedemail.com (Postfix) with ESMTP id 13F7AA000386 for ; Wed, 24 Mar 2021 20:22:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id EC54F401A9; Wed, 24 Mar 2021 21:22:21 +0100 (CET) Authentication-Results: ste-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b=mUke6Mhz; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se Authentication-Results: ste-ftg-msa2.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uwy-0R5DIGEx; Wed, 24 Mar 2021 21:22:21 +0100 (CET) Received: by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 4B8D8401B9; Wed, 24 Mar 2021 21:22:18 +0100 (CET) Received: from [10.249.254.166] (unknown [192.198.151.44]) by mail1.shipmail.org (Postfix) with ESMTPSA id 0695836062E; Wed, 24 Mar 2021 21:22:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1616617338; bh=mjVvc9eC6YajJlFKKvLl6cV8/6/08eBr/yysRCc8+Ew=; h=Subject:To:References:From:Date:In-Reply-To:From; b=mUke6Mhz/EjBhy6BxSLI+hGZTe4KitrU8n1Pxt95MkZiPi5Xaj0ccLhSugRHrlkid c5l5Met3bKk5lcIOYNIsJ8e6VhhsCuXzyomxA7AgZvKPQ+HCRzrg7wutbtNWqVL7jI 7SeKGdvhdhVdi7t/HTqMy1m6XG491Oz5w46LWXqQ= Subject: Re: [RFC PATCH 1/2] mm,drm/ttm: Block fast GUP to TTM huge pages To: Dave Hansen , "Williams, Dan J" , "dri-devel@lists.freedesktop.org" , "christian.koenig@amd.com" , "jgg@nvidia.com" , "airlied@linux.ie" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" References: <20210321184529.59006-1-thomas_os@shipmail.org> <20210321184529.59006-2-thomas_os@shipmail.org> <75423f64-adef-a2c4-8e7d-2cb814127b18@intel.com> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= Message-ID: Date: Wed, 24 Mar 2021 21:22:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <75423f64-adef-a2c4-8e7d-2cb814127b18@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Stat-Signature: 3ih1iw71ux3msd1cac9aszfij1qaqtrc X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 13F7AA000386 Received-SPF: none (shipmail.org>: No applicable sender policy available) receiver=imf24; identity=mailfrom; envelope-from=""; helo=ste-pvt-msa2.bahnhof.se; client-ip=213.80.101.71 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616617341-647588 Content-Transfer-Encoding: quoted-printable 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 3/24/21 5:34 PM, Dave Hansen wrote: > On 3/24/21 3:05 AM, Thomas Hellstr=C3=B6m (Intel) wrote: >> Yes, I agree. Seems like the special (SW1) is available also for huge >> page table entries on x86 AFAICT, although just not implemented. >> Otherwise the SW bits appear completely used up. > Although the _PAGE_BIT_SOFTW* bits are used up, there's plenty of room > in the hardware PTEs. Bits 52->58 are software-available, and we're > only using 58 at the moment. > > We also have not been careful at *all* about how _PAGE_BIT_SOFTW* are > used. It's quite possible we can encode another use even in the > existing bits. > > Personally, I'd just try: > > #define _PAGE_BIT_SOFTW5 57 /* available for programmer */ > OK, I'll follow your advise here. FWIW I grepped for SW1 and it seems=20 used in a selftest, but only for PTEs AFAICT. Oh, and we don't care about 32-bit much anymore? /Thomas