Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp622515rwb; Fri, 4 Aug 2023 20:08:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHW7paZxg1qEB1sMEG4ksIW09GxgikhuiRqn3I5MvtQogZDvDw6IU+aejx9w5vXOrzRd5OX X-Received: by 2002:a05:6358:5282:b0:134:c4dc:2c43 with SMTP id g2-20020a056358528200b00134c4dc2c43mr3012376rwa.28.1691204907068; Fri, 04 Aug 2023 20:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691204907; cv=none; d=google.com; s=arc-20160816; b=ZbkvAgl6jeNUQWJZd0v3AeXmI7Mw3JSLd3XSJ28SuYVQwZY9TYRmTnQAK4sryqRfqN k9jQmFZC+ziWWt+LYB7ECsyXMZ62AwZ6mZ+YkryEZmxB2fbxaBYCCFzaRws5AcgxRo3M uAtW8DjJs4gDH2Cdt5j1yyyJqMPs21gxvolDX+yk54Pp1r3ShTP2k3HGTAeKQRRQKZiz K8+x1sjQ9dH+XJ0z4Xo9q/TuHZqIv4hCFVNZl77qGKrF+hf1T23zAWAhZ7eEZPrK/R54 HQ3wp+sNH+qzR872/LUm4ST2O+MgLW+7wdLBlTqNTuZdp+7pO0IAzaBq3PaLmtJy97rg TYiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=dDhzbzzJQ7H6TIaOjv+DCVyRihwCc3DWWqsTbcc9XtA=; fh=QP4mBsatd/9HhyEadQ5VNwOrn9mmbSbiZfdCo43bmVA=; b=zzp+DMK6UiqBWfK30zWD9M7lOG7VCtyLC4EutjruBKHcFzmC+l5M8Z8qkdujcO6Sf8 HsCNm/BnkKeBU9Vl/3rW7sHxFCLQR6++HGLe7iNeWmJrsqkvj3x7eQDoh31csEcCoh9I yUq3uaEd9EmUuEUERdjaFzuJfJCnKx7HebkQJtQfFhkRpQX8TEzC3CZzW3HqgTIkdQHd IOQE9cCCExmw8LR8GB4vHBqOWM6SqfUrEcrFC2KP13IbYMZQbwGVPYK8Lv7t5h/VwN3w 5JB0x6IQiei/I00ky/Uqi2CaOcSIWJL1X10y6LavEMTGIFy2Q8scoI3bdvs6HyCzUsG2 5CzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e8-20020a636908000000b00564d932782dsi341223pgc.59.2023.08.04.20.08.15; Fri, 04 Aug 2023 20:08:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229682AbjHEB4e (ORCPT + 99 others); Fri, 4 Aug 2023 21:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229671AbjHEB4d (ORCPT ); Fri, 4 Aug 2023 21:56:33 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A07C10D2; Fri, 4 Aug 2023 18:56:31 -0700 (PDT) Received: from dggpeml500012.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4RHly76QYnzVjsj; Sat, 5 Aug 2023 09:54:39 +0800 (CST) Received: from [10.67.110.218] (10.67.110.218) by dggpeml500012.china.huawei.com (7.185.36.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sat, 5 Aug 2023 09:56:28 +0800 Message-ID: <6fba4b93-0e7d-0f92-6ffc-690888274f00@huawei.com> Date: Sat, 5 Aug 2023 09:56:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 1/2] tracing: Fix cpu buffers unavailable due to 'record_disabled' messed To: kernel test robot , , , , CC: , , , References: <20230804124549.2562977-2-zhengyejian1@huawei.com> <202308050731.PQutr3r0-lkp@intel.com> Content-Language: en-US From: Zheng Yejian In-Reply-To: <202308050731.PQutr3r0-lkp@intel.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.110.218] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpeml500012.china.huawei.com (7.185.36.15) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/8/5 09:15, kernel test robot wrote: > Hi Zheng, > > kernel test robot noticed the following build errors: > > [auto build test ERROR on linus/master] > [also build test ERROR on rostedt-trace/for-next v6.5-rc4 next-20230804] > [cannot apply to rostedt-trace/for-next-urgent] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Zheng-Yejian/tracing-Fix-cpu-buffers-unavailable-due-to-record_disabled-messed/20230804-204751 > base: linus/master > patch link: https://lore.kernel.org/r/20230804124549.2562977-2-zhengyejian1%40huawei.com > patch subject: [PATCH 1/2] tracing: Fix cpu buffers unavailable due to 'record_disabled' messed > config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20230805/202308050731.PQutr3r0-lkp@intel.com/config) > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 > reproduce: (https://download.01.org/0day-ci/archive/20230805/202308050731.PQutr3r0-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202308050731.PQutr3r0-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > kernel/trace/trace.c: In function 'tracing_set_cpumask': >>> kernel/trace/trace.c:5280:60: error: 'struct trace_array' has no member named 'max_buffer'; did you mean 'array_buffer'? > 5280 | ring_buffer_record_disable_cpu(tr->max_buffer.buffer, cpu); > | ^~~~~~~~~~ > | array_buffer > kernel/trace/trace.c:5286:59: error: 'struct trace_array' has no member named 'max_buffer'; did you mean 'array_buffer'? > 5286 | ring_buffer_record_enable_cpu(tr->max_buffer.buffer, cpu); > | ^~~~~~~~~~ > | array_buffer > Thank you, robot! I'll fix it in v2 soon. > > vim +5280 kernel/trace/trace.c > > 5260 > 5261 int tracing_set_cpumask(struct trace_array *tr, > 5262 cpumask_var_t tracing_cpumask_new) > 5263 { > 5264 int cpu; > 5265 > 5266 if (!tr) > 5267 return -EINVAL; > 5268 > 5269 local_irq_disable(); > 5270 arch_spin_lock(&tr->max_lock); > 5271 for_each_tracing_cpu(cpu) { > 5272 /* > 5273 * Increase/decrease the disabled counter if we are > 5274 * about to flip a bit in the cpumask: > 5275 */ > 5276 if (cpumask_test_cpu(cpu, tr->tracing_cpumask) && > 5277 !cpumask_test_cpu(cpu, tracing_cpumask_new)) { > 5278 atomic_inc(&per_cpu_ptr(tr->array_buffer.data, cpu)->disabled); > 5279 ring_buffer_record_disable_cpu(tr->array_buffer.buffer, cpu); >> 5280 ring_buffer_record_disable_cpu(tr->max_buffer.buffer, cpu); > 5281 } > 5282 if (!cpumask_test_cpu(cpu, tr->tracing_cpumask) && > 5283 cpumask_test_cpu(cpu, tracing_cpumask_new)) { > 5284 atomic_dec(&per_cpu_ptr(tr->array_buffer.data, cpu)->disabled); > 5285 ring_buffer_record_enable_cpu(tr->array_buffer.buffer, cpu); > 5286 ring_buffer_record_enable_cpu(tr->max_buffer.buffer, cpu); > 5287 } > 5288 } > 5289 arch_spin_unlock(&tr->max_lock); > 5290 local_irq_enable(); > 5291 > 5292 cpumask_copy(tr->tracing_cpumask, tracing_cpumask_new); > 5293 > 5294 return 0; > 5295 } > 5296 >