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 B1A2EC433FE for ; Mon, 14 Nov 2022 09:06:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4DB246B0072; Mon, 14 Nov 2022 04:06:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 463C36B0073; Mon, 14 Nov 2022 04:06:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DD6B8E0002; Mon, 14 Nov 2022 04:06:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 1A32F6B0072 for ; Mon, 14 Nov 2022 04:06:24 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id DF31C140D30 for ; Mon, 14 Nov 2022 09:06:23 +0000 (UTC) X-FDA: 80131466646.11.A9A276E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf17.hostedemail.com (Postfix) with ESMTP id 6FABF4000B for ; Mon, 14 Nov 2022 09:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668416782; 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=MyDiWdKe1VYdsKgzDX1uadXsuftR4IzIbTjD84A1VBs=; b=YO4i5RnYA0Rru/9xonjpOJjOMHF7ng1JtR90/hS6BFrNRN6VHu0a0oxwsL4K+PRwh+jEyI dMjHWuAKCc+ylxik6y8PvTWKZCmm50B3kopUhPlTwFIhx083rD31bUd0bnNTdqwBQ14X8I JJhPUhoVXm/sM5CwHfBUe1zqF/IsNvQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-77-kSNcQBr6NyWqbSaJKl7mkA-1; Mon, 14 Nov 2022 04:06:21 -0500 X-MC-Unique: kSNcQBr6NyWqbSaJKl7mkA-1 Received: by mail-wm1-f71.google.com with SMTP id z15-20020a1c4c0f000000b003cf6f80007cso2697359wmf.3 for ; Mon, 14 Nov 2022 01:06:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MyDiWdKe1VYdsKgzDX1uadXsuftR4IzIbTjD84A1VBs=; b=PhJoq29fm8N6crDR0z5SVnGSoZIOM1pbwYX6X3GwkRR7ijAounOaDVwIHp9YJ0QQB1 y2YkuG2MdccfbBKSqXBrzF/4vAoLVgTipQV9KedzCG8WuNMYLQfrCjt7JNlMir73N+XP jHMRxu3AZoCj+j/9RTU1gKqwKAVYiQxLzw4CPUG2nFhzvvtedxeq85XAEYqzl4QlupyD v6IhQfFImSFklyG0J4wHFq4wuVnRfrEvvDpiR6ppsNro1+luram6WTjimzgfiM3jEKqx XszWl/Awmpccpjo+AT9nLwpeh0uPyBk5zJj/8gBlZfy32Y8TdEImKdPQYDN0HcFVfrW9 lTbw== X-Gm-Message-State: ANoB5pkhEWTsE3YDnLFIMWUlq7lq9Qzqxzx4P/sTtgkkTL9VAiWGcNxO 45KjCwRallA6KnugvfJznsmyrE2iiWgfnHnjDifzLPywjBsWo0WYnJWeyohvk1gtmuDSozOqITz 7VlKsVQPJdyk= X-Received: by 2002:a05:6000:51:b0:241:553e:5040 with SMTP id k17-20020a056000005100b00241553e5040mr6948316wrx.578.1668416780274; Mon, 14 Nov 2022 01:06:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf4l1B+wPdFoYaTSboiqdtBGcv+KQQAevPv9Adl6JHAVGpTZ8odXESHyxfOdy80t/1su8czTaA== X-Received: by 2002:a05:6000:51:b0:241:553e:5040 with SMTP id k17-20020a056000005100b00241553e5040mr6948298wrx.578.1668416780032; Mon, 14 Nov 2022 01:06:20 -0800 (PST) Received: from ?IPV6:2003:cb:c703:d300:8765:6ef2:3111:de53? (p200300cbc703d30087656ef23111de53.dip0.t-ipconnect.de. [2003:cb:c703:d300:8765:6ef2:3111:de53]) by smtp.gmail.com with ESMTPSA id i22-20020a05600c355600b003cf894c05e4sm19299080wmq.22.2022.11.14.01.06.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Nov 2022 01:06:19 -0800 (PST) Message-ID: Date: Mon, 14 Nov 2022 10:06:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v9 2/3] hugetlb: remove duplicate mmu notifications To: Mike Kravetz , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Naoya Horiguchi , Axel Rasmussen , Mina Almasry , Peter Xu , Nadav Amit , Rik van Riel , Vlastimil Babka , Matthew Wilcox , Andrew Morton , Wei Chen , stable@vger.kernel.org References: <20221111232628.290160-1-mike.kravetz@oracle.com> <20221111232628.290160-3-mike.kravetz@oracle.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20221111232628.290160-3-mike.kravetz@oracle.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668416783; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=MyDiWdKe1VYdsKgzDX1uadXsuftR4IzIbTjD84A1VBs=; b=Sm6cQGMLa5JBDiQ4nf7iFRur2DPJ5RZd7vC4YAJQnbZvYPZZeE7RLhY7+7y8W4ROacaw1h ds9C93AJ6R2mEuf+1Vgo9TYvUoKuO9wXoti66yDcRYINikG05v6sUP0SMkV+wXUrwV+Pa7 BFHxS6RGUM9rGJN8jGols5W6I3f5HQU= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=YO4i5RnY; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf17.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668416783; a=rsa-sha256; cv=none; b=XA6rlrTgqdPvjNC26eCTbnfNxDodrJPw4DspJY4ou+2znBOexAaJDvyUWKzdo7KuQsBTf9 edaluTBRQDUTVsItotOaohp9vE6PI0Ke1iE3T1vz4APNoNHoe2en/hlim/RwZRY2Hw/b5P BxEsMozkVbkBYlxasEc3KgAa3r9pCtM= X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 6FABF4000B X-Rspam-User: Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=YO4i5RnY; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf17.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com X-Stat-Signature: utgqcu5ghygsehunu699r3kgkqzofbsf X-HE-Tag: 1668416783-972046 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 12.11.22 00:26, Mike Kravetz wrote: > The common hugetlb unmap routine __unmap_hugepage_range performs mmu > notification calls. However, in the case where __unmap_hugepage_range > is called via __unmap_hugepage_range_final, mmu notification calls are > performed earlier in other calling routines. > > Remove mmu notification calls from __unmap_hugepage_range. Add > notification calls to the only other caller: unmap_hugepage_range. > unmap_hugepage_range is called for truncation and hole punch, so > change notification type from UNMAP to CLEAR as this is more appropriate. > > Fixes: 90e7e7f5ef3f ("mm: enable MADV_DONTNEED for hugetlb mappings") > Signed-off-by: Mike Kravetz > Reported-by: Wei Chen > Cc: Why exactly do we care about stable backports here? What's the user-visible impact? -- Thanks, David / dhildenb