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 6915BC43334 for ; Tue, 28 Jun 2022 15:29:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BCDEC6B0071; Tue, 28 Jun 2022 11:29:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B7EBF6B0072; Tue, 28 Jun 2022 11:29:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A46958E0001; Tue, 28 Jun 2022 11:29:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 92DB66B0071 for ; Tue, 28 Jun 2022 11:29:39 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 579291233 for ; Tue, 28 Jun 2022 15:29:39 +0000 (UTC) X-FDA: 79628029278.04.4494037 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by imf04.hostedemail.com (Postfix) with ESMTP id 4AC804003F for ; Tue, 28 Jun 2022 15:29:37 +0000 (UTC) Received: by mail-pj1-f51.google.com with SMTP id w24so12913089pjg.5 for ; Tue, 28 Jun 2022 08:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GbW4NuEgaNk8iXnqeHVDmPcJNFTOfGhN7YoLZsDvjjU=; b=SYGhAs9kNTsqIjUiYzrGMrV724WHEeSKEt2JDTF3kV1rovW4Dh9JUi1asrwCOE5tY8 dAXvt341ActjSq4Mre0xDy3f72LqABXcnID/vtUlIUSLJCBz7VN9IvVIj6jAl0FNZbAX 7uxslHHE9evmGBv+JKpuVR30CQT+HvH29y4cxmfiXhTP89UsprA398fCd0SN44BYjIQk BtGUGY1IBoVJhX/D8Bn1UbdFG0MG5DEoiaYCRa6mRyPPl5uxThBT95CLthM7a/NraUvT DtPQ3+TBlrcj/ptoTx9vClcyCp4tPX93X5H+KsgbgAdKA7m1/z1JTkfd+9nwEMVhhkCB IyxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GbW4NuEgaNk8iXnqeHVDmPcJNFTOfGhN7YoLZsDvjjU=; b=cH6FZ5hQOiI6iEmbiFVIq32iFoygDZaD/2VM6xkZnXtwsKUx8fPDk94qeML6Q+Ug+0 y0J94TzE8UgXWtB2rNI/t+MiCNhEi2WFbLeMaJe6MEQU8Ds5qIbHI3pFPW7ottzozU1C e71DEiHK0ubDno/Eq6dGiVLhjHRFNwYgtjeGrbR8+L9BLFYXnciMODLDAy1Z7zI8oIxg 5+gfhqJFqqBXjbnwyzrtnh1V7OzUpor8zXJ4TfHabeyPsW+z4QahWn0A6fPH6qBU/v8u VI8LAG13Pa3M3JHW6qPTpZz7Q4I76x22MK5fRasVt5bBGxvVMecj1H2ZlCe7cuWy3yHm OZsQ== X-Gm-Message-State: AJIora8deGq7GooL7I10QaF/Ve8i0SSH0PoKNRHJIBF8KYdYSQROVQyn Kc4bid2wfA1v9SQ3rVtAJ3Thj1raaKFs6XyrHz1icQ== X-Google-Smtp-Source: AGRyM1teM52cYsj/ucnvyw+ULXM5H94YrpROT8deeiSMkpmkqiym/VDJdhQgGKnECo8ufyec3yr45JS6y5Ceof0oeoM= X-Received: by 2002:a17:903:2490:b0:168:d4d0:54da with SMTP id p16-20020a170903249000b00168d4d054damr5626146plw.42.1656430176681; Tue, 28 Jun 2022 08:29:36 -0700 (PDT) MIME-Version: 1.0 References: <20220624173656.2033256-1-jthoughton@google.com> <20220624173656.2033256-5-jthoughton@google.com> In-Reply-To: From: James Houghton Date: Tue, 28 Jun 2022 08:29:25 -0700 Message-ID: Subject: Re: [RFC PATCH 04/26] hugetlb: make huge_pte_lockptr take an explicit shift argument. To: Mike Kravetz Cc: Muchun Song , Peter Xu , David Hildenbrand , David Rientjes , Axel Rasmussen , Mina Almasry , Jue Wang , Manish Mishra , "Dr . David Alan Gilbert" , linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656430178; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=GbW4NuEgaNk8iXnqeHVDmPcJNFTOfGhN7YoLZsDvjjU=; b=ZH+8U0RGkW1FZfNTZYeMJd3nHuJ3vl9Uzk7LmOFn4eRZd9LPuCuTeX/DJ4uouhZvkxx3fU A+6Qlja0Wlsi+oFbi3KTZb2S2k08Y15eKb8GICxSnuvg7gAaFcEhVFaDq2SLg9No08xUyC FvKtMVukUPFyJDdHr+eHAaysXwT6Dqg= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=SYGhAs9k; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf04.hostedemail.com: domain of jthoughton@google.com designates 209.85.216.51 as permitted sender) smtp.mailfrom=jthoughton@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656430178; a=rsa-sha256; cv=none; b=4L0aiBxUWHkwFfSADEuebMMji8CHJh/sesrq/2gCpfE77F4NylINjJ1w1bKTxZ9UAg7nK4 SHAWP4Hncecd0Uz1ip1cd00qXgQ1QWa6XzkWssgFc3wgsY8S0Gri4bqKuBbJdIIxMWsbVf vY6BFVhoe3D4ujYeTICtSJf8UdZIED0= X-Rspamd-Queue-Id: 4AC804003F Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=SYGhAs9k; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf04.hostedemail.com: domain of jthoughton@google.com designates 209.85.216.51 as permitted sender) smtp.mailfrom=jthoughton@google.com X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: iuap84wzpb78padtidpypuwbumhto7rs X-HE-Tag: 1656430177-394191 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 Mon, Jun 27, 2022 at 1:52 PM Mike Kravetz wrote: > > On 06/24/22 17:36, James Houghton wrote: > > This is needed to handle PTL locking with high-granularity mapping. We > > won't always be using the PMD-level PTL even if we're using the 2M > > hugepage hstate. It's possible that we're dealing with 4K PTEs, in which > > case, we need to lock the PTL for the 4K PTE. > > I'm not really sure why this would be required. > Why not use the PMD level lock for 4K PTEs? Seems that would scale better > with less contention than using the more coarse mm lock. I should be using the PMD level lock for 4K PTEs, yeah. I'll work this into the next version of the series. Thanks both. > > -- > Mike Kravetz