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 AF9CEC433F5 for ; Wed, 24 Nov 2021 13:25:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4000F6B007B; Wed, 24 Nov 2021 08:25:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AEE66B007D; Wed, 24 Nov 2021 08:25:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 278DF6B007E; Wed, 24 Nov 2021 08:25:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 19F546B007B for ; Wed, 24 Nov 2021 08:25:25 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id C9F39180E4EE9 for ; Wed, 24 Nov 2021 13:25:14 +0000 (UTC) X-FDA: 78843895200.05.7CCA8AA Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf31.hostedemail.com (Postfix) with ESMTP id A99401046320 for ; Wed, 24 Nov 2021 13:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637760313; h=from:from: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; bh=YPJilnIac+E/1S4aK4r1xPmWiIMnvA9sCROlm1Reb+4=; b=QbEF2o315uptTIP3V7swbUcyo7qXSPMxfOwxDndFPjyEsmS3oev1CvpfwM/OuccSELKfGT 0yVePaXmCZIyTPaEND2Tl1GooqSqjPDe8zKiatF9ltQRg/mI5M7M0HFfU051SU24IKWN/U x1gSksIpeSuqriySUwM+43ngRVeR/U4= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-246-6z1A8tdMPCOOb_1B4Qx9CA-1; Wed, 24 Nov 2021 08:25:12 -0500 X-MC-Unique: 6z1A8tdMPCOOb_1B4Qx9CA-1 Received: by mail-wr1-f69.google.com with SMTP id v18-20020a5d5912000000b001815910d2c0so497788wrd.1 for ; Wed, 24 Nov 2021 05:25:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=YPJilnIac+E/1S4aK4r1xPmWiIMnvA9sCROlm1Reb+4=; b=tIHdt5nnL4PHVEfmLDjnI2xUP2hXma4PZfLslZQj/+pPlLvdTarKFmxs/gR/IpStbi DkUl0sWAl/nsGrH2fWLt/X/BpeqfIv5EFS4HzWE7cVT1uJ+M1Ie8KyzEaq+6YKdEyOe5 srSRNHTGC7W6rJwy/Ls0CMcUgo6mwS4CrmBtd2tLMgKX4SxBX1DUYMWysSKcK8j7dfb1 Znw7DSc7inWhOt2PnrqOxGDTv8lo20cfbSfcjp8l/OvAntEXQIzqPxQeb0Emw+HtYA14 gEvzwESeOY39e9WI67bBwOoFDCeCi6CfYpXDgJYLrygSWTgtUBN0SmdQcZg9vH+fIo1B BiLQ== X-Gm-Message-State: AOAM532hRSK4XcBlh8zux+a37cFRhw/aWKQpV4d0ZzKABUbwPZDKDAwd Y7C0wPVl05yc+ChOHe2I3b6JPQ3UrAvUh5zAm6hf5zl90/rvtG69SrCEUUTT0zMHnZLzi3FqIY3 5ckmslbrL2wc= X-Received: by 2002:a1c:1f94:: with SMTP id f142mr15517444wmf.192.1637760311336; Wed, 24 Nov 2021 05:25:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJyk+ncnGnjxU4A8q6MYUYXWQOTDE6uMjmtInX9yqzD5DhRTt5y9jx2YvAZtwG8QWD4fQJVp4g== X-Received: by 2002:a1c:1f94:: with SMTP id f142mr15517394wmf.192.1637760311107; Wed, 24 Nov 2021 05:25:11 -0800 (PST) Received: from [192.168.3.132] (p5b0c6380.dip0.t-ipconnect.de. [91.12.99.128]) by smtp.gmail.com with ESMTPSA id h15sm5707861wmq.32.2021.11.24.05.25.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Nov 2021 05:25:10 -0800 (PST) Message-ID: Date: Wed, 24 Nov 2021 14:25:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH] Increase default MLOCK_LIMIT to 8 MiB To: Jason Gunthorpe Cc: Vlastimil Babka , Jens Axboe , Andrew Dona-Couch , Andrew Morton , Drew DeVault , Ammar Faizi , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, io_uring Mailing List , Pavel Begunkov , linux-mm@kvack.org References: <5f998bb7-7b5d-9253-2337-b1d9ea59c796@redhat.com> <20211123132523.GA5112@ziepe.ca> <10ccf01b-f13a-d626-beba-cbee70770cf1@redhat.com> <20211123140709.GB5112@ziepe.ca> <20211123170056.GC5112@ziepe.ca> <20211123235953.GF5112@ziepe.ca> <2adca04f-92e1-5f99-6094-5fac66a22a77@redhat.com> <20211124132353.GG5112@ziepe.ca> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20211124132353.GG5112@ziepe.ca> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: A99401046320 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=QbEF2o31; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf31.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=david@redhat.com X-Stat-Signature: go1e7pdwsdqmzrjs3qjqkztycb5sityn X-HE-Tag: 1637760307-114565 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 24.11.21 14:23, Jason Gunthorpe wrote: > On Wed, Nov 24, 2021 at 09:57:32AM +0100, David Hildenbrand wrote: > >> Unfortunately it will only be a band aid AFAIU. I can rewrite my >> reproducer fairly easily to pin the whole 2M range first, pin a second >> time only a single page, and then unpin the 2M range, resulting in the >> very same way to block THP. (I can block some THP less because I always >> need the possibility to memlock 2M first, though). > > Oh! > > The issue is GUP always pins an entire compound, no matter how little > the user requests. That's a different issue. I make sure to split the compound page before pinning anything :) -- Thanks, David / dhildenb