Received: by 10.192.165.156 with SMTP id m28csp1954336imm; Thu, 12 Apr 2018 06:25:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+7QRSu2GwW3u2/jnf/iQVc6mB+1iVp9BmGzXbuzTshxxxyOic1aszSJSXfVgnA1m3P3ncm X-Received: by 10.99.123.85 with SMTP id k21mr689666pgn.99.1523539505940; Thu, 12 Apr 2018 06:25:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523539505; cv=none; d=google.com; s=arc-20160816; b=zNDnHKtXHqymO6H2yxRsfFHCvf+QmLHLjZl/9NP5kwgILpxvpEJDOJjrb7MaqsVgCl 7ejMPBsDqFEUCjvczfEUNa0+SMb8Qf65UmlMedlzv8xoEg8XTQ1bqsOhmjZ0lGac+0Kv bGzJC/055CNJuYiYkdy8TDEsryeJbICnBref1GBRgATSb/mMIFPd3aFqZ7pE+pzQXbkD Lbq/XC+3/520U5CQfS4gNLOcHESET+bRQ8hqezLTeLJFJcbNzOGDAaurefoznwb9V5Ps hu7SgW7KEYB6Ms+mLkT7xuWXBIKmiS35pyZJHap4WVzzTpcuUYL/5kd3Jx55zSPe+IrE IfpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :organization:from:references:cc:to:subject :arc-authentication-results; bh=DWETn4Jrfh3skBAp+KqQ+GwfMA/6qxLylE3ZEgFUa5o=; b=hptTbFnp7RLbdfiLWJ3Os2GyyrWwntVGt4T4hlUorFrDNPa3diA1iEODGAsvBwDaK6 YAcXc4ctf4sesYBqkj8NFcQewR0eKwKJFBO6iZk3hKFQbtcWTgFB8O2D0ojoCDHEMGXs JjXJhW+WT27+5cCnHxhuL4g+0YWQb6vIWEy5CiTtGA2pXyfYIB6GBrbaj07STr4Dhy5B XUUnV2j48G0Gbqgq+WaaLn6vhBQWHQBU29wgewQlLsS44LcQvUZm8V/Rlw/S5bApnK+C XWFq5pqRaX+ab1aw2o4lD0MwNM1Xj9T1f0Hk1NKsYNfoUpRiLMgFrt9hUmQ/AnBEGkPW kthA== ARC-Authentication-Results: i=1; mx.google.com; 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6si2505753pfh.272.2018.04.12.06.24.28; Thu, 12 Apr 2018 06:25:05 -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; 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbeDLNVQ (ORCPT + 99 others); Thu, 12 Apr 2018 09:21:16 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41046 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751832AbeDLNVO (ORCPT ); Thu, 12 Apr 2018 09:21:14 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3CDL14d047125 for ; Thu, 12 Apr 2018 09:21:14 -0400 Received: from e06smtp10.uk.ibm.com (e06smtp10.uk.ibm.com [195.75.94.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ha6vakuxd-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 12 Apr 2018 09:21:01 -0400 Received: from localhost by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Apr 2018 14:19:34 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 12 Apr 2018 14:19:32 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3CDJWpw56885404; Thu, 12 Apr 2018 13:19:32 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5F9064C046; Thu, 12 Apr 2018 14:12:10 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 00AD34C040; Thu, 12 Apr 2018 14:12:10 +0100 (BST) Received: from oc3784624756.ibm.com (unknown [9.152.212.222]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 12 Apr 2018 14:12:09 +0100 (BST) Subject: Re: [PATCH] perf record: Remove unnecessary warning for missing sysfs entry To: Arnaldo Carvalho de Melo , Thomas Richter Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, brueckner@linux.vnet.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com References: <20180412114723.48550-1-tmricht@linux.ibm.com> <20180412130513.GB9818@kernel.org> From: Thomas-Mich Richter Organization: IBM LTC Date: Thu, 12 Apr 2018 15:19:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180412130513.GB9818@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18041213-0040-0000-0000-0000042D87E9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041213-0041-0000-0000-00002631A0EC Message-Id: <53a2face-d26c-8851-d594-5f78da5814c3@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-12_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804120132 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/2018 03:05 PM, Arnaldo Carvalho de Melo wrote: > Em Thu, Apr 12, 2018 at 01:47:23PM +0200, Thomas Richter escreveu: >> Using perf on 4.16.0 kernel on s390 shows warning >> failed: can't open node sysfs data >> each time I run command perf record ... for example: >> >> [root@s35lp76 perf]# ./perf record -e rB0000 -- sleep 1 >> [ perf record: Woken up 1 times to write data ] >> failed: can't open node sysfs data >> [ perf record: Captured and wrote 0.001 MB perf.data (4 samples) ] >> [root@s35lp76 perf]# >> >> BTW: I find this error message not very informative. > > What an understatement :-) > >> It turns out commit e2091cedd51bf ("perf tools: Add MEM_TOPOLOGY >> feature to perf data file") tries to open directory named >> /sys/devices/system/node/ which does not exist on s390. >> >> This is the call stack: >> __cmd_record >> +---> perf_session__write_header >> +---> perf_header__adds_write >> +---> do_write_feat >> +---> write_mem_topology >> +---> build_mem_topology >> prints warning >> The issue starts in do_write_feat() which unconditionally >> loops over all features and now includes HEADER_MEM_TOPOLOGY and calls >> write_mem_topology(). >> Function record__init_features() at the beginning of __cmd_record() >> sets all features and then turns off some. >> >> Fix this by removed the warning, if the directory is not present >> memory node information is not available and won't be displayed. > > Can't we instead improve the error message and turn this into a > pr_debug2? Isn't it a reasonable scenario that the user expects this > topology information to be present and then ends up without it? > > Perhaps something like: > > pr_debug2("%s: could't read %s, does this arch have topology information?\n", __func__, path); > > - Arnaldo > Fine with me, I will provide a version 2.... -- Thomas Richter, Dept 3303, IBM LTC Boeblingen Germany -- Vorsitzende des Aufsichtsrats: Martina Koederitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294