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=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 E1159C4363D for ; Wed, 23 Sep 2020 04:40:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5AEC221548 for ; Wed, 23 Sep 2020 04:40:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Jv6TyfJL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="eM01rmGY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5AEC221548 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AA7Eo2Yn47jXOw8mwY8J0iYrIBsC7L/g2Kgz+hm8FoI=; b=Jv6TyfJLUwBo5fP4TEuKSnn+m zxFsi+1tRLvmItCr3BKAZAVt3AGXCm86cX8AFYuWtdaI0CQoYEBKRAY06Ud1uYXWTgRqPJrNist2T QMTD5SSLW9nnij4d2yia0RjASVMaOR0YCa7jWrwryevbg6h3ZoLhtQRRcebOgf21NQg6F1NJhJcSt xnOG0iqfTtAa38/YUf3q44odgr/u9x69A15iiKUkgR9PJkuzIfrRXloZDIUSY0cka+rmgtQzPYycV SNoUSG8fGdMgI7zCuG5d9rcBn5rTm4jcIDaY6M+2Jo5o8Qs3/sgSpS6MQj0U44MASBI65BwFZXRvf 7YboN59RA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKwYt-0003JH-PS; Wed, 23 Sep 2020 04:39:23 +0000 Received: from z5.mailgun.us ([104.130.96.5]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKwYq-0003IU-Gd for linux-arm-kernel@lists.infradead.org; Wed, 23 Sep 2020 04:39:21 +0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1600835960; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=62upVWs2yXzGE3gWPGzEaiN42HD4HHF9FHmkRd8LCPQ=; b=eM01rmGYPqWHaNP9u/v6a6GavcNZEXM09fJLIWS5dqzYLx9x69p9TWqviurjRF8nuuAqM4gD 2ZmkXjb5FKumfYlW64tglEVjeOo/kpgGNN/XrdzFXKoSkeSfJj8KE1NvLruWLA3yK/Vxy945 MbcZMmsfrBix+rKdY0fbZaVLKYw= X-Mailgun-Sending-Ip: 104.130.96.5 X-Mailgun-Sid: WyJiYzAxZiIsICJsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 5f6ad177fddb75314aff1f58 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 23 Sep 2020 04:39:19 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 28321C43387; Wed, 23 Sep 2020 04:39:19 +0000 (UTC) Received: from codeaurora.org (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tingwei) by smtp.codeaurora.org (Postfix) with ESMTPSA id 64634C433CA; Wed, 23 Sep 2020 04:39:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 64634C433CA Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=tingweiz@codeaurora.org Date: Wed, 23 Sep 2020 12:39:07 +0800 From: Tingwei Zhang To: Alexander Shishkin Subject: Re: [PATCH v3 6/6] stm class: ftrace: use different channel accroding to CPU Message-ID: <20200923043907.GA5146@codeaurora.org> References: <20200903001706.28147-1-tingwei@codeaurora.org> <20200903001706.28147-7-tingwei@codeaurora.org> <87zh5nw8vz.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87zh5nw8vz.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200923_003920_661251_BFDB105D X-CRM114-Status: GOOD ( 20.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tsoni@codeaurora.org, Sai Prakash Ranjan , Tingwei Zhang , Mathieu Poirier , Suzuki K Poulose , Mao Jinlong , linux-kernel@vger.kernel.org, Steven Rostedt , Ingo Molnar , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Alexandre Torgue Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 18, 2020 at 08:45:52PM +0800, Alexander Shishkin wrote: > Tingwei Zhang writes: > > > @@ -63,6 +65,7 @@ static int __init stm_ftrace_init(void) > > { > > int ret; > > > > + stm_ftrace.data.nr_chans = num_possible_cpus(); > > Not a problem with this patch necesarily, but this made me realize that > .nr_chans may be larger than: > > (1) what the policy permits, > (2) what the stm device can handle. > > While (1) the user can fix in the policy, they won't be able to fix (2), > in which case they won't be able to use stm_ftrace at all. I'm thinking > if a link-time callback would be good enough. > Hi Alex, I'm not sure if I understand this correct. If the nr_chans requested by stm_ftrace is larger than policy permits or stm device can handle, stm_assign_first_policy() returns with error so stm_source_link_add() will fail. User would notice that when link happens. There's not much we can do if resource is not enough. > Another thing is that .nr_chans needs to be a power of 2 at the moment. > I'll change to below. stm_ftrace.data.nr_chans = roundup_pow_of_two(num_possible_cpus()); > Regards, > -- > Alex > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel