Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10866377rwr; Fri, 12 May 2023 14:23:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ422SE5YHPGaOroaipEYoH/fdthIEwPk2ECvPVoISjs9Ej+2lcdBe4IkUXpgQfZVeOXfX8x X-Received: by 2002:a05:6a20:938e:b0:104:4bfa:5ede with SMTP id x14-20020a056a20938e00b001044bfa5edemr6314221pzh.45.1683926596275; Fri, 12 May 2023 14:23:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683926596; cv=none; d=google.com; s=arc-20160816; b=yDGKSxOh628y6g3/4aGPrOzv91v0oa4QeCiUi9jpPdA/x2AGpvPo7maZCu9+C8qMty hyGpSijgIDGgOt5jqgchRQXK5fJvp+IXrbYQEaJFyAAGpfxtJ+djj461eTy3Qb4YcCfl OvnUJ6wods5dymRtQNlDuL9pqcTJ2+DgoAp3QMOOWwk/RUbWF3IEA7oisfjseuJpkVHv aeri0UuXjK21nUYmuWu1ky7l/Doh3YmOa7+3oZhVWhAYkyfeBFEckUPjykYsBks+nG9g 55eogPNqIqNZWac/AINYWHwqvISRGbPynSbWv8rUYa/GZylkYKeBBKtjIx91DtWu9o2J m1dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=nqsLqlAN3czrFKPz/1Q7lmk66avDWHKVM8stcgmsqnY=; b=QdwGk4BeojlQjtYahYovLve7HSaWFqnbV+y4S1E5I2RWYY6UuekPT04R5xWKUzOud4 8zH4qPD2QMwNI+w8O/sTIwf9DVUOwvz/fVnK7+7pkcKQ5fddxvkwYFkptAiNTCWHpvkc hCDVQfxyw3uq7P+KZOc4+GDHDLZBFI11ymocAkaccWTOxdf8a3EBogFzEONB+MymQNez v30GAYKBiRNRs80okruZ5gkRJdH2XnY/b2VX67HF2mOQVVA/v3xNsLfsgqU+ldGqmGyU IqyMbJqNwGFRF9ark1P07BMvWz6FLPSNH3YOhknNGXI6ecG1rIHaJ8JB92H9E+De60Pu tsrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="dFurDZZ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l197-20020a633ece000000b0051b9938a68esi10138224pga.128.2023.05.12.14.23.00; Fri, 12 May 2023 14:23:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b="dFurDZZ/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237159AbjELVD6 (ORCPT + 99 others); Fri, 12 May 2023 17:03:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236116AbjELVD5 (ORCPT ); Fri, 12 May 2023 17:03:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0745C35AD for ; Fri, 12 May 2023 14:03:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A0EBE60C0D for ; Fri, 12 May 2023 21:03:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5FDEC433EF; Fri, 12 May 2023 21:03:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1683925435; bh=nqsLqlAN3czrFKPz/1Q7lmk66avDWHKVM8stcgmsqnY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dFurDZZ/2x+jDThsWcbS37/WKCuCQ+sxDT+RC8KQoC23sQUhCwQdv2nUcq6VVmy9A efV/5NN1FwC33xgoQvFGoyVgwRAgRnC04ZvhCYqP5H7mgosf8ymMzLSMiUCh48D7Ly qG/7aY6Va0IWB0H/p9UsBjOlca1sq49eWSpIwBE4= Date: Fri, 12 May 2023 14:03:53 -0700 From: Andrew Morton To: Junxiao Chang Cc: kirill.shutemov@linux.intel.com, mhocko@suse.com, jmarchan@redhat.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, mike.kravetz@oracle.com, muchun.song@linux.dev Subject: Re: [PATCH] mm: fix hugetlb page unmap count balance issue Message-Id: <20230512140353.8b95e8cb024c8e7a1a3b03c1@linux-foundation.org> In-Reply-To: <20230512072036.1027784-1-junxiao.chang@intel.com> References: <20230512072036.1027784-1-junxiao.chang@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 12 May 2023 15:20:36 +0800 Junxiao Chang wrote: > hugetlb page usually is mapped with pmd, but occasionally it might be > mapped with pte. QEMU can use udma-buf to create host dmabufs for guest > framebuffers. When QEMU is launched with parameter "hugetlb=on", > udmabuffer driver maps hugetlb page with pte in page fault handler. Are there any other situations in which a hugetlb page is mapped in this fashion? If not, can QEMU be changed to map with a pmd? So we get one less weird special case in MM.