Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3081989img; Mon, 25 Mar 2019 03:27:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2/lSRJbOGuH018e4q75gkox2n5lZYs9m9uGRjI/hJ4vLc5z7GR3/ZWuCDWc+OV7VPE701 X-Received: by 2002:a62:5142:: with SMTP id f63mr23449796pfb.57.1553509666414; Mon, 25 Mar 2019 03:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553509666; cv=none; d=google.com; s=arc-20160816; b=v0FAMxK83sDdzbm9qnu1fjOfBBjUJDILVhQw5TnGeIVsCywI9JAcQw1Yk66uTqantd aMoPY5z7fRisknzn449aaTNu0iaEENbo14DtuAOMAZiEL0SWywILnORokM6bXj4GQaRe Vh8MD6V6RoTghZ4tESh8Xy+2eqpN/xMcyFh2VgZAtsWtTcxXh1EyNqoLjaMhwXuRpC25 0YMwaLlZo0P0tBrOqh1J8wyv5ogzSWZCL4Qz5EdaztgQA2/7JMyLL7swLyFYvUHbcvwA K1gitsR4zBBTQfifPzjohyBtkjjdT+zlDRmsEKEpesPFpN5w2/MtxJneyfdK5lFvQZen fMeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=i/dGCf71cqBarbVkvLDKse6m1paYOC5pSFEdRoC6Q3c=; b=K6vwu3/vCV6YMxYbbTnhj+z172YVXe/43VrhSf5whS9DMSz8uUvbYVlfG+giJctxpc aE7oO2szR2cJ0Erv5yYUS4TwF5H7Pcc3QObeAzjTv0AjAlHOPBDHR9Sad4O45ODPDndN qNiE9p/RD40o5s36/YUGQ4gP4lG5NN6FuoFBoitrpfpIiasQpxnjgAMLqIcCTZc9YUX7 k8paxL7a5AeBfQV/6QCxCUHzjrXWnTP6NdDR//7WGigD0E8xR2Sd/INE9vcKm58XyJVc baJDLorkBPDRao4In+iZcwKfLplwtVavQOpHXowb9HL6yE/3IzK39z6e2ul1ZjwVoSJu d03w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=JkwusLut; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si2218108pgn.237.2019.03.25.03.27.31; Mon, 25 Mar 2019 03:27:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=JkwusLut; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730633AbfCYK0r (ORCPT + 99 others); Mon, 25 Mar 2019 06:26:47 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:51638 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730361AbfCYK0r (ORCPT ); Mon, 25 Mar 2019 06:26:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=i/dGCf71cqBarbVkvLDKse6m1paYOC5pSFEdRoC6Q3c=; b=JkwusLutfp/9cnc3arV/XuhPn qd1iWBFbPbOcDct049ces1dweEmJYMIKBVP2ZfXAbHtQ2tTsGLz3YbTzklr5JeYaR7uGa5xduETwx Xyrlasb/SIWEfm2+QUMG368rLfJyyUatcDoNNnz6Xk4spYrMuFhESZ+jeYQXtgbK8XB2BBfLA6h5v BfBIS61lJ8yVwGQzOPOPsdoF3o0RqNHundnnTS0Jmi68wcFz3gdZWIRauwTddtt6KcNgmUfoAGVOZ 5OqzjnEkNz+T2JbJeD59F56KUlMIr/Z6mwigP35utGmEJq1M8cbLgQtXSBNP1lurYUa45lsnXBDdU ZYytzw9Cw==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:55208) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1h8MoQ-0001vI-R4; Mon, 25 Mar 2019 10:26:38 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1h8MoL-00031u-UX; Mon, 25 Mar 2019 10:26:33 +0000 Date: Mon, 25 Mar 2019 10:26:33 +0000 From: Russell King - ARM Linux admin To: Peter Chen Cc: Michal Nazarewicz , peter.chen@nxp.com, fugang.duan@nxp.com, linux-usb@vger.kernel.org, lkml , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, Marek Szyprowski Subject: Re: Why CMA allocater fails if there is a signal pending? Message-ID: <20190325102633.v6hkvda6q7462wza@shell.armlinux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 25, 2019 at 04:37:09PM +0800, Peter Chen wrote: > Hi Michal & Marek, > > I meet an issue that the DMA (CMA used) allocation failed if there is a user > signal, Eg Ctrl+C, it causes the USB xHCI stack fails to resume due to > dma_alloc_coherent > failed. It can be easy to reproduce if the user press Ctrl+C at > suspend/resume test. It has been possible in the past for cma_alloc() to take seconds or longer to allocate, depending on the size of the CMA area and the number of pinned GFP_MOVABLE pages within the CMA area. Whether that is true of today's CMA or not, I don't know. It's probably there to allow such a situation to be recoverable, but is not a good idea if we're expecting dma_alloc_*() not to fail in those scenarios. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up