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 X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B58C2C47423 for ; Mon, 28 Sep 2020 07:39:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C739A208FE for ; Mon, 28 Sep 2020 07:39:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="vEz9VsuL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C739A208FE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CDC8F6B005D; Mon, 28 Sep 2020 03:39:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C8CB96B0062; Mon, 28 Sep 2020 03:39:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA3626B0068; Mon, 28 Sep 2020 03:39:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id A4DA46B005D for ; Mon, 28 Sep 2020 03:39:20 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 663D94DC5 for ; Mon, 28 Sep 2020 07:39:20 +0000 (UTC) X-FDA: 77311669680.09.silk08_1304ac62717f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 467B3180AD801 for ; Mon, 28 Sep 2020 07:39:20 +0000 (UTC) X-HE-Tag: silk08_1304ac62717f X-Filterd-Recvd-Size: 3106 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Sep 2020 07:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=hqkx8jeEj++yCvhNy1iXe80ijlnH1MK0e5LKjgnXTCY=; b=vEz9VsuLO+XrX52MGpk4MZGAqG YW/LJ9w04opOx+0057JpZsIG1B852u+NILq642TWBciFNMEsoJNI6P0pM2qLTdsILQZQnSjapOgSq MQYAagaBgjIZVVCaHPU9kKg1qAU82R6Ki5rv9lLZMtJII24mdc4oYd2gBjokDJ0Mb9T8xK8Ni2PFr mpqpRLyHftzZxMtE6jZFc2UrhjvgrhjgVvgFNqyi4Y7wSMlzYX+mKWX2ydKCW98oAqwRqfMZjmMHZ PRy5/TdKduM6cYjXrTLFLhmJz8B028n0DxgIrpjBbazjtRjS2bd6KXC2mUYpEcqMt1mcbOp8DYYBW d5ITwp4A==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMnkZ-00088p-6o; Mon, 28 Sep 2020 07:39:07 +0000 Date: Mon, 28 Sep 2020 08:39:07 +0100 From: Christoph Hellwig To: David Hildenbrand Cc: Chris Goldsworthy , akpm@linux-foundation.org, linux-mm@kvack.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, pratikp@codeaurora.org, pdaly@codeaurora.org, sudraja@codeaurora.org, iamjoonsoo.kim@lge.com, linux-arm-msm-owner@vger.kernel.org, Vinayak Menon , linux-kernel-owner@vger.kernel.org Subject: Re: [PATCH v2] mm: cma: indefinitely retry allocations in cma_alloc Message-ID: <20200928073907.GA29322@infradead.org> References: <06489716814387e7f147cf53d1b185a8@codeaurora.org> <1599851809-4342-1-git-send-email-cgoldswo@codeaurora.org> <010101747e998731-e49f209f-8232-4496-a9fc-2465334e70d7-000000@us-west-2.amazonses.com> <72ae0f361df527cf70946992e4ab1eb3@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html 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 Tue, Sep 15, 2020 at 09:53:30AM +0200, David Hildenbrand wrote: > Two thoughts: > > 1. Most (all?) alloc_contig_range() users are interested in handling > short-term pinnings in a nice way (IOW, make the allocation succeed). > I'd much rather want to see this being handled in a nice fashion inside > alloc_contig_range() than having to encode endless loops in the caller. > This means I strongly prefer something like [3] if feasible. But I can > understand that stuff ([5]) is complicated. I have to admit that I am > not an expert on the short term pinning described by you, and how to > eventually fix it. Agreed. Also retrying forever is simply broken, and will lead to deadlocks for the DMA calls into CMA, so with my dma-mapping hat on I have to hard-NAK this approach.