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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E531C4332F for ; Fri, 16 Dec 2022 06:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbiLPGrE (ORCPT ); Fri, 16 Dec 2022 01:47:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbiLPGqv (ORCPT ); Fri, 16 Dec 2022 01:46:51 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C94D755ABF for ; Thu, 15 Dec 2022 22:46:49 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id A8D8E68AA6; Fri, 16 Dec 2022 07:46:45 +0100 (CET) Date: Fri, 16 Dec 2022 07:46:45 +0100 From: Christoph Hellwig To: Mikhail Gavrilov Cc: Takashi Iwai , alsa-devel@alsa-project.org, hch@lst.de, m.szyprowski@samsung.com, Linux List Kernel Mailing , Robin Murphy , iommu@lists.linux.dev Subject: Re: [6.2][regression] after commit ffcb754584603adf7039d7972564fbf6febdc542 all sound devices disappeared (due BUG at mm/page_alloc.c:3592!) Message-ID: <20221216064645.GA24446@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ok, it seems like the sound noncontig alloc code that I already commented on as potentially bogus GFP_GOMP mapping trips this. I think for now the right thing would be to revert the hunk in dma-iommu.c (see patch below). The other thing to try would be to remove both uses GFP_COMP in sound/core/memalloc.c, which should have the same effect. diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 9297b741f5e80e..f798c44e090337 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -744,9 +744,6 @@ static struct page **__iommu_dma_alloc_pages(struct device *dev, /* IOMMU can map any pages, so himem can also be used here */ gfp |= __GFP_NOWARN | __GFP_HIGHMEM; - /* It makes no sense to muck about with huge pages */ - gfp &= ~__GFP_COMP; - while (count) { struct page *page = NULL; unsigned int order_size; 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91D6BC4332F for ; Fri, 16 Dec 2022 06:47:54 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A173E16F3; Fri, 16 Dec 2022 07:47:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A173E16F3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1671173271; bh=IgG9+45/iTCOb24FVIEn0dt+X2X0qnOOwzl2uKPITdc=; h=Date:From:To:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=UTOmVayI+BYvvVshfr35s4JfJKUKPnx8VflY7FA8FtjkO01QTTgI2oUQoPzNExdIu w3ieUsYAC+P8CHYKtdU9y9SzMYRElYruCRCLNZ5Mu0MDY6qHqRCtHfvNMca211w67a yjr3KL2xI6TyA7M7Q5M7oNy8GPd2y3P0pe4KOIVQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 32014F804E0; Fri, 16 Dec 2022 07:47:01 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B6C45F804E2; Fri, 16 Dec 2022 07:46:50 +0100 (CET) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1DE31F804D0 for ; Fri, 16 Dec 2022 07:46:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1DE31F804D0 Received: by verein.lst.de (Postfix, from userid 2407) id A8D8E68AA6; Fri, 16 Dec 2022 07:46:45 +0100 (CET) Date: Fri, 16 Dec 2022 07:46:45 +0100 From: Christoph Hellwig To: Mikhail Gavrilov Subject: Re: [6.2][regression] after commit ffcb754584603adf7039d7972564fbf6febdc542 all sound devices disappeared (due BUG at mm/page_alloc.c:3592!) Message-ID: <20221216064645.GA24446@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Takashi Iwai , Linux List Kernel Mailing , iommu@lists.linux.dev, Robin Murphy , hch@lst.de, m.szyprowski@samsung.com Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Ok, it seems like the sound noncontig alloc code that I already commented on as potentially bogus GFP_GOMP mapping trips this. I think for now the right thing would be to revert the hunk in dma-iommu.c (see patch below). The other thing to try would be to remove both uses GFP_COMP in sound/core/memalloc.c, which should have the same effect. diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 9297b741f5e80e..f798c44e090337 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -744,9 +744,6 @@ static struct page **__iommu_dma_alloc_pages(struct device *dev, /* IOMMU can map any pages, so himem can also be used here */ gfp |= __GFP_NOWARN | __GFP_HIGHMEM; - /* It makes no sense to muck about with huge pages */ - gfp &= ~__GFP_COMP; - while (count) { struct page *page = NULL; unsigned int order_size;