Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp349527imu; Thu, 3 Jan 2019 21:51:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN5DAwMnIBaZIXp6XtgQEexVh7hct6jf1qD5qBPl74iXb66ukXywuJ0R9qqy+SZ3MdTtDit1 X-Received: by 2002:a63:5d20:: with SMTP id r32mr526346pgb.329.1546581070366; Thu, 03 Jan 2019 21:51:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546581070; cv=none; d=google.com; s=arc-20160816; b=pBw3ysg73RHS3HyEJU4wr21rxDyaz16kkfFvYyI3sUHM2++LK7YLh6h+XEsRd15KfV Gr+XOriQXg0X2uCavEiGwB7FPoiiBTTNjV5JF6M+EwLCBT6XD3GsKWdL19KzhTLeEI7y 0P3kpKtIujccys6iyRO/kUUgIap9CQul7QJvKlPAJFrPuyMG+QLETjYLlvyFfcmEwO2g QMvXGUA43rsQ9D2yepqFxEmn9Yp3tAXVBr4Vn9IbNISmDY+/wYfbctr5J8Klwi7RF+Nx TvFUppw2EQwpJNXrd2LkRA2v1aleySFZRc8y591dm1X2ak9KlUyrbtkxnW6gIyjYUrgF dHZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature; bh=5GXXRK3oNflNE5U/4fxiyOhBcb7W40a6bYVbMFGm9Ss=; b=JqKyxWoqUu0uJdWQaIWHH5e0M2HeDKiXbUpNv67gXUViXVOlx1qM9n1UhkX0PLWP1j W5WgjmKDE2VfBkQHNqI3X0qi42lomMEebRLbfgmYCo2aKl5yBSk7KWjOatipYJUuVSDn EvtuRRB++dOPc7Jfq2otytxqkfLEEzUatsDHFScGIlmC4pFlD5N/FSwfEpn/3rCbZI45 JFnYU7lczlwWhqihNct8ri4mIBl+9BHEaXmWMaThZ/kuWz0OhX+G+lfHw3i0bVDj24Jh J3C2XYL+Ch9bOzMDBPHxLqBeLscUXNsZRhQM972VJFq8MJb9WYijnhMNG2zPFpNQU9zF 8PKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=ZL0hjZsF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si5906250pgq.434.2019.01.03.21.50.52; Thu, 03 Jan 2019 21:51:10 -0800 (PST) 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=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=ZL0hjZsF; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727684AbfADBbv (ORCPT + 99 others); Thu, 3 Jan 2019 20:31:51 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:52004 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726497AbfADBbu (ORCPT ); Thu, 3 Jan 2019 20:31:50 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x041O4GH136832; Fri, 4 Jan 2019 01:31:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=5GXXRK3oNflNE5U/4fxiyOhBcb7W40a6bYVbMFGm9Ss=; b=ZL0hjZsFjwu5MQImtN/N7gOdnJSPkg/ITCnTkTi0Q6V7yfPhcuzjaXfvPCHpRfYaLY09 9BgnrCGkD7MVlA4iDfgFkmzQwSW0jRSADPXG3Tae+7Vw1ddXiLDauvDZUsq//PCs2aea CEJ5lh4kc9ghGbq+DKSIZb4dOC1nQXC9KRLE6YKxiT/4RfYBynPw0vzxQjjvKjiMhMMT AaKgVoyWMFFLnOyfoV8mKlt7cOfPIhwpPcQsr0TTpTJrrzu+d67FgGYodrHsIUUc3EVf s0mRLx95Q1Up17Of7I89ehlX9x2o8nzsBo/yNHjIMOMghbcln24fATbrw5n87UCVCGRT dA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2130.oracle.com with ESMTP id 2pnxeea3mf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 04 Jan 2019 01:31:38 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x041VbqA007195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Jan 2019 01:31:37 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x041VZqI007141; Fri, 4 Jan 2019 01:31:36 GMT Received: from [10.182.69.241] (/10.182.69.241) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 03 Jan 2019 17:31:35 -0800 Subject: Re: [PATCH v2 1/2] swiotlb: add debugfs to track swiotlb buffer usage To: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, konrad.wilk@oracle.com References: <1544402278-8175-1-git-send-email-dongli.zhang@oracle.com> <41becd27-8c3a-da2b-e5ed-e361ba20e4d4@linux.intel.com> <34883ba5-b444-3d37-4d40-9b0a651dd2eb@oracle.com> Cc: Joe Jin , Tim Chen , hch@lst.de, m.szyprowski@samsung.com, robin.murphy@arm.com From: Dongli Zhang Message-ID: <98fdfb0c-0207-9a0a-4875-b834cfd1b2c3@oracle.com> Date: Fri, 4 Jan 2019 09:34:33 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <34883ba5-b444-3d37-4d40-9b0a651dd2eb@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9125 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901040011 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Konrad, Would you please take a look on those two patches? In addition, there is another patch correcting an error in comment. https://lkml.org/lkml/2018/12/5/1721 Thank you very much! Dongli Zhang On 12/11/2018 05:05 AM, Joe Jin wrote: > On 12/10/18 12:00 PM, Tim Chen wrote: >>> @@ -528,6 +538,9 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, >>> dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", size); >>> return SWIOTLB_MAP_ERROR; >>> found: >>> +#ifdef CONFIG_DEBUG_FS >>> + io_tlb_used += nslots; >>> +#endif >> One nit I have about this patch is there are too many CONFIG_DEBUG_FS. >> >> For example here, instead of io_tlb_used, we can have a macro defined, >> perhaps something like inc_iotlb_used(nslots). It can be placed in the >> same section that swiotlb_create_debugfs is defined so there's a single >> place where all the CONFIG_DEBUG_FS stuff is located. >> >> Then define inc_iotlb_used to be null when we don't have >> CONFIG_DEBUG_FS. >> > > Dongli had removed above ifdef/endif on his next patch, "[PATCH v2 2/2] > swiotlb: checking whether swiotlb buffer is full with io_tlb_used" > > Thanks, > Joe >