Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbdFUG4C (ORCPT ); Wed, 21 Jun 2017 02:56:02 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:8365 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbdFUG4B (ORCPT ); Wed, 21 Jun 2017 02:56:01 -0400 Message-ID: <594A185E.4060709@huawei.com> Date: Wed, 21 Jun 2017 14:55:26 +0800 From: zhouchengming User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Alexander Shishkin CC: , , , , Subject: Re: [PATCH] perf/core: make sure group events are for the same cpu References: <1497685332-122353-1-git-send-email-zhouchengming1@huawei.com> <874lvaztzw.fsf@ashishki-desk.ger.corp.intel.com> In-Reply-To: <874lvaztzw.fsf@ashishki-desk.ger.corp.intel.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.236.183] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.594A1877.006E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 2345756854100f2881ecb512f6452de3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 689 Lines: 30 On 2017/6/20 21:08, Alexander Shishkin wrote: > Zhou Chengming writes: > >> The else branch are broken for taskctx: > This is not a good way to open a commit message. > >> two events can on the same taskctx, but on different cpu. > How? fd1 = perf_open_event(attr, pid, 0, -1, flags); fd2 = perf_open_event(attr, pid, 1, fd1, flags); fd1 will be the leader event, fd2 will be the sibling event in the group. And they are for the same task, so they will be put on the same taskctx successfully if !move_group. Obviously it's wrong, we can't concurrently schedule them as a group, since they are on different cpu. Thanks. > > Regards, > -- > Alex > > . >