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 D278CC4332F for ; Wed, 16 Nov 2022 06:12:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9F17D1638; Wed, 16 Nov 2022 07:11:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9F17D1638 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1668579125; bh=U9Gbiiaovlju09Ro5wHT8eaxb0Q8LHJLDoIIXnvFipk=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HEtvOY+9xgrI9+vIngxkYQjsE88Esxpd7cZ70AaepEr+pwgzNidpoUCONVIJ+596Z gBQ2MX2VJT47O3wVgpbh8PuLjrMBn85ooOZlthZR7FHS+4mudV38ZqW43Fy+Umb2Cl dcvykLkB9anEI41HS28TzwfocQcpEJ4id9n96Dcw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2B723F800B8; Wed, 16 Nov 2022 07:11:15 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C6CA6F80163; Wed, 16 Nov 2022 07:11:12 +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 0C282F80089 for ; Wed, 16 Nov 2022 07:11:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0C282F80089 Received: by verein.lst.de (Postfix, from userid 2407) id CFEBC68AA6; Wed, 16 Nov 2022 07:11:06 +0100 (CET) Date: Wed, 16 Nov 2022 07:11:06 +0100 From: Christoph Hellwig To: Leon Romanovsky Subject: Re: [PATCH 7/7] dma-mapping: reject __GFP_COMP in dma_alloc_attrs Message-ID: <20221116061106.GA19118@lst.de> References: <20221113163535.884299-1-hch@lst.de> <20221113163535.884299-8-hch@lst.de> 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) Cc: linux-s390@vger.kernel.org, alsa-devel@alsa-project.org, linux-media@vger.kernel.org, Alexandra Winter , Dennis Dalessandro , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Takashi Iwai , Wenjia Zhang , iommu@lists.linux.dev, Russell King , Mauro Carvalho Chehab , Robin Murphy , Christoph Hellwig , linux-arm-kernel@lists.infradead.org, Marek Szyprowski X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Mon, Nov 14, 2022 at 10:11:50AM +0200, Leon Romanovsky wrote: > In RDMA patches, you wrote that GFP_USER is not legal flag either. So it > is better to WARN here for everything that is not allowed. So __GFP_COMP is actually problematic and changes behavior, and I plan to lift an optimization from the arm code to the generic one that only rounds up allocations to the next page size instead of the next power of two, so I need this check now. Other flags including GFP_USER are pretty bogus to, but I actually need to do a full audit before rejecting them, which I've only done for GFP_COMP so far. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 069DEC448 for ; Wed, 16 Nov 2022 06:11:11 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id CFEBC68AA6; Wed, 16 Nov 2022 07:11:06 +0100 (CET) Date: Wed, 16 Nov 2022 07:11:06 +0100 From: Christoph Hellwig To: Leon Romanovsky Cc: Christoph Hellwig , Dennis Dalessandro , Mauro Carvalho Chehab , Alexandra Winter , Wenjia Zhang , Marek Szyprowski , Jaroslav Kysela , Takashi Iwai , Russell King , Robin Murphy , linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-media@vger.kernel.org, netdev@vger.kernel.org, linux-s390@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 7/7] dma-mapping: reject __GFP_COMP in dma_alloc_attrs Message-ID: <20221116061106.GA19118@lst.de> References: <20221113163535.884299-1-hch@lst.de> <20221113163535.884299-8-hch@lst.de> Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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) On Mon, Nov 14, 2022 at 10:11:50AM +0200, Leon Romanovsky wrote: > In RDMA patches, you wrote that GFP_USER is not legal flag either. So it > is better to WARN here for everything that is not allowed. So __GFP_COMP is actually problematic and changes behavior, and I plan to lift an optimization from the arm code to the generic one that only rounds up allocations to the next page size instead of the next power of two, so I need this check now. Other flags including GFP_USER are pretty bogus to, but I actually need to do a full audit before rejecting them, which I've only done for GFP_COMP so far. 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 41D16C4332F for ; Wed, 16 Nov 2022 06:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tvEpYoxGNqpMjDqbg0oRY4s9P0HzPTFBTQIHcWaOwQA=; b=CTCYb04b/SdERS U+CdngsOZJdf6RsLGpvkVkvo0FzJ96kqOZRazYr3ZAi213q7Raqt6bN1BPLtUUElQRkX96suX7DcV +vpg5DLP/KkKphiUsWASRiSwK8XVqcsIzuqEBDzikV9N7dE0AFw2fe/KaFmZQTTrQljmTDtFZ2P3Y phuHzeCtsJ78CvogBXeATHg4EmR7LYZLbCaZBTSGUq6t3qhUCJQb3tBrzmhr9KY9pN8oyoKtBRux3 rRFbo80fSldIiiKFiSC2QtjCOz0OCjgw3147Pm5KYUBGhVNaH3ea6CxFJcJSx5ErtzY29rv5qq9RK w4VDJTbylgcVukoSvJHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovBdh-000CPV-C6; Wed, 16 Nov 2022 06:11:13 +0000 Received: from verein.lst.de ([213.95.11.211]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovBde-000COH-Ue for linux-arm-kernel@lists.infradead.org; Wed, 16 Nov 2022 06:11:12 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id CFEBC68AA6; Wed, 16 Nov 2022 07:11:06 +0100 (CET) Date: Wed, 16 Nov 2022 07:11:06 +0100 From: Christoph Hellwig To: Leon Romanovsky Cc: Christoph Hellwig , Dennis Dalessandro , Mauro Carvalho Chehab , Alexandra Winter , Wenjia Zhang , Marek Szyprowski , Jaroslav Kysela , Takashi Iwai , Russell King , Robin Murphy , linux-arm-kernel@lists.infradead.org, linux-rdma@vger.kernel.org, iommu@lists.linux.dev, linux-media@vger.kernel.org, netdev@vger.kernel.org, linux-s390@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 7/7] dma-mapping: reject __GFP_COMP in dma_alloc_attrs Message-ID: <20221116061106.GA19118@lst.de> References: <20221113163535.884299-1-hch@lst.de> <20221113163535.884299-8-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221115_221111_149997_98DDAFE4 X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Nov 14, 2022 at 10:11:50AM +0200, Leon Romanovsky wrote: > In RDMA patches, you wrote that GFP_USER is not legal flag either. So it > is better to WARN here for everything that is not allowed. So __GFP_COMP is actually problematic and changes behavior, and I plan to lift an optimization from the arm code to the generic one that only rounds up allocations to the next page size instead of the next power of two, so I need this check now. Other flags including GFP_USER are pretty bogus to, but I actually need to do a full audit before rejecting them, which I've only done for GFP_COMP so far. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel