Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6314005rwd; Mon, 19 Jun 2023 05:43:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5h/I3hITQ6zvjWsm/1znNu+oksDKVI/wmCmz2XAoHFh3RjAbyPFTlwvxw05oAi8GZDR9q2 X-Received: by 2002:a17:902:b58b:b0:1b6:7432:1f6e with SMTP id a11-20020a170902b58b00b001b674321f6emr470629pls.6.1687178611076; Mon, 19 Jun 2023 05:43:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687178611; cv=none; d=google.com; s=arc-20160816; b=OqHBhayAGvUTtqbMQ0BGKg76yqi9+Yci47gIxODVhnIF+jZB1ubQdQNDwPSzniIRIc FGS3f8lSVDqM9uaBzWey5F0ZdqMKDkA65ScEFWGM4SVbJB0h/jSMsamSmPpu4iPbpJDp NitQbi6SWMb4Yn0GM1mNfCUFsE3aCGtpaR6CzrYi46nLs2tIKlofWkI5k4nomRymRRx5 Q0hcaFzSn1ATRkvS8qJbrDq8dp2VeuNfLqU+K2quJ17wmm74LeVcbiEzqz47x4TgTaA/ EovqbbTgqVNC8MmIaOQKZ0/3uYo0gqzN6AIIkHYt15DXIp3/h7d96opl/pc2wzbScByC wyEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yAWE58CsaAMtd+AIOuACgTo0t+B1QSHHfRWY4TLyueI=; b=B1V3vPApy7Ljvmyo2fSrlutVeOMY2k8VGdOUtoPl4U1zHto3bJoD3CaPfgKnHCK5GI e3kMGIREOZed/o+ZcSIfjoXLMxJ6B/NV9yHYKzuT1m/5JTyqFFVrDwh1+I580ahu2JWW ky+1H5/CJfAL8tDbigPU+pyJ9jyBHOUnOmaWkYk2juG5nXY5nmrfpMC6mvLVKCklcRht gGjSTmnyLLiMDR+CVQyctbL0UDZWvLL2oaNqoe8W5xahzk0Q/Wb6UuITiSwCCRin5+B9 Kc4VrvnBhoY672Ff1LcF45CjhWoeA3rcHZ1IBpXmg9uB2hDSRYVgoEQ2dwWV6K3mHvOJ CyMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eUeIX6Uz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a170902d48700b001b55fd24d91si2779128plg.591.2023.06.19.05.43.19; Mon, 19 Jun 2023 05:43:31 -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=@redhat.com header.s=mimecast20190719 header.b=eUeIX6Uz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbjFSMgV (ORCPT + 99 others); Mon, 19 Jun 2023 08:36:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjFSMgT (ORCPT ); Mon, 19 Jun 2023 08:36:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89CE7E6 for ; Mon, 19 Jun 2023 05:35:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687178128; 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: in-reply-to:in-reply-to:references:references; bh=yAWE58CsaAMtd+AIOuACgTo0t+B1QSHHfRWY4TLyueI=; b=eUeIX6UzWmIBwp64Vv9+00k8U2DCgr2D6sR53fWM8kCmFWzdsm8AW8gCrXA+77xmSMvZNH K5FkFoGHcJdnpqPMlgrMZo+inMQAABmTW/7cHe6XGj9ntFnMT7mqavo5pAgmqTlgYbpote bqcbmun1oG+o7iwMb3H2X/RE1vp/QH8= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-434-iZkqP-SwMrCQnSEB2MSuuw-1; Mon, 19 Jun 2023 08:35:23 -0400 X-MC-Unique: iZkqP-SwMrCQnSEB2MSuuw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A24D52A59570; Mon, 19 Jun 2023 12:35:22 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4644740C6F58; Mon, 19 Jun 2023 12:35:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E201218003AB; Mon, 19 Jun 2023 14:35:15 +0200 (CEST) Date: Mon, 19 Jun 2023 14:35:15 +0200 From: Gerd Hoffmann To: Mike Kravetz Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org, qemu-devel@nongnu.org, Vivek Kasireddy , Dongwon Kim , Junxiao Chang , kirill.shutemov@linux.intel.com, mhocko@suse.com, jmarchan@redhat.com, muchun.song@linux.dev, James Houghton , David Hildenbrand , Greg Kroah-Hartman , Andrew Morton , stable@vger.kernel.org Subject: Re: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)' Message-ID: References: <20230608204927.88711-1-mike.kravetz@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230608204927.88711-1-mike.kravetz@oracle.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Thu, Jun 08, 2023 at 01:49:27PM -0700, Mike Kravetz wrote: > This effectively reverts commit 16c243e99d33 ("udmabuf: Add support > for mapping hugepages (v4)"). Recently, Junxiao Chang found a BUG > with page map counting as described here [1]. This issue pointed out > that the udmabuf driver was making direct use of subpages of hugetlb > pages. This is not a good idea, and no other mm code attempts such use. > In addition to the mapcount issue, this also causes issues with hugetlb > vmemmap optimization and page poisoning. > > For now, remove hugetlb support. > > If udmabuf wants to be used on hugetlb mappings, it should be changed to > only use complete hugetlb pages. This will require different alignment > and size requirements on the UDMABUF_CREATE API. > > [1] https://lore.kernel.org/linux-mm/20230512072036.1027784-1-junxiao.chang@intel.com/ > > Fixes: 16c243e99d33 ("udmabuf: Add support for mapping hugepages (v4)") > Cc: > Signed-off-by: Mike Kravetz Acked-by: Gerd Hoffmann