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.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 C3036C433E1 for ; Fri, 31 Jul 2020 20:49:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8895722B42 for ; Fri, 31 Jul 2020 20:49:50 +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="FzUcUdR8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8895722B42 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 20ED48D005A; Fri, 31 Jul 2020 16:49:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BF2E8D000B; Fri, 31 Jul 2020 16:49:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0D62E8D005A; Fri, 31 Jul 2020 16:49:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id E83328D000B for ; Fri, 31 Jul 2020 16:49:49 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id A2F421EE6 for ; Fri, 31 Jul 2020 20:49:49 +0000 (UTC) X-FDA: 77099562498.01.floor11_630f89726f86 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 68B231004CB3E for ; Fri, 31 Jul 2020 20:49:49 +0000 (UTC) X-HE-Tag: floor11_630f89726f86 X-Filterd-Recvd-Size: 2762 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf18.hostedemail.com (Postfix) with ESMTP for ; Fri, 31 Jul 2020 20:49:48 +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=/q30urdzzKXnpoJ7dXdtjQrPbekj62/yJbF+tw5Z+LY=; b=FzUcUdR8C6VL3g1heE8U8qPOOz skp4/ZS5oZ/jNXWB9AIGNkGq5yYjwRvWaaI+t9JzJUKMIz4OlhO9o633+W2DXzDBaQnUsn5f5U8N8 NTixXRNwq8Wq0Zcw04ROlFjkQMIXch+/ycVdIkpUBTrOtbglDRkfrTIlwHYjeTmENH/L525S5nVYY lSVIZfrPPten5K1gomKBrrciuobW9nOO0TXH2Rkijc4iHARPxUpF1RXVpoQckjDLub/iTlaIGv0Ur JpkKHg7qXfggG2fBxLwxWXLmfSrwTgiMi70LQIbd6P8wWCfYnTbd9UwmR4cV9KaAH7be+85bLiiX8 f+cb23Aw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1byH-00021t-4m; Fri, 31 Jul 2020 20:49:41 +0000 Date: Fri, 31 Jul 2020 21:49:41 +0100 From: Matthew Wilcox To: Andrew Morton Cc: qiang.zhang@windriver.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/dmapool.c: add WARN_ON() in dma_pool_destroy Message-ID: <20200731204941.GR23808@casper.infradead.org> References: <20200731023939.19206-1-qiang.zhang@windriver.com> <20200731023858.GO23808@casper.infradead.org> <20200731133215.73cf5ce464e2b894aeac0773@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200731133215.73cf5ce464e2b894aeac0773@linux-foundation.org> X-Rspamd-Queue-Id: 68B231004CB3E X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 Fri, Jul 31, 2020 at 01:32:15PM -0700, Andrew Morton wrote: > On Fri, 31 Jul 2020 03:38:58 +0100 Matthew Wilcox wrote: > > > On Fri, Jul 31, 2020 at 10:39:39AM +0800, qiang.zhang@windriver.com wrote: > > > The pool is being destroyed, all page which in the pool, > > > should be free. if some page is still be use by somebody, > > > we should not just output error logs, also should also add > > > a warning message. > > > > There's already a warning message. What value does this actually have? > > Presumably so we get a backtrace in order to identify the errant > caller. The existing message includes the name of the pool. We don't typically have more than one place that destroys a pool. What might be helpful would be something that said who allocated and didn't free the object, but again, there's typically only one place which allocates from any given pool, so even that would be all that helpful. I'm not particularly impressed by these patches which don't actually justify themselves.