Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp218919lqo; Tue, 7 May 2024 18:46:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUP9YKxX438ELf3T6b/xnG3tVewCc/BGKbNxGcYmpT/hnG807RYrNLVkxLX7Gt4a+b/xnvmdX0TV3AFz89IxvCgDNIUu6c3tdN8qs4Vzw== X-Google-Smtp-Source: AGHT+IHeJOIoeM+bXoHD+yRgva0M9nw4qyk9MggyZmeNF+GOyZyz42KVxSCqztxxoNllQ1eoumTS X-Received: by 2002:a50:ab14:0:b0:572:a07a:677d with SMTP id 4fb4d7f45d1cf-5731d9d13c4mr825512a12.23.1715132762399; Tue, 07 May 2024 18:46:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715132762; cv=pass; d=google.com; s=arc-20160816; b=yWNyepAEgEVQI3TjnrXnlaEgVrDI6FMiID8gOlXDhAaW58eYqWRjVvc6P0n4W35Di6 3cb1m7O1SWcGanCbj7SYDkb73Ca0c+0X+TSRiXmcsLfo0VVWiNfSIlpChv13SB7ejWbe OvP7lqzFlLGyfjkU2KJAb1VXWXHSaseqTlLUBePLFl6qcDR6IlU130cdtRC0r59hVrpw irc1Rsxzl/lCgZ+QaWMZTU8lk8v4SxWV5+F9OiMkfTMKIFJhSbpT9Z1EPq76+gB/lIu/ UkQAslc/je0VbtxEyi9sPOa0xnAObtdmO1W8F1vub2a4WIdvG/8rqbpkkBLNSY4RusIr 53xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=gG/Mg01aPwawcgX1ZVQCj4coaePzrbjJoyz1wJasTvE=; fh=Cs9PkWt3dZAU4JApiaqzu5Zj5imVv1YdyhQ4hFl7ufU=; b=vXp3+QeJiGG1Bsn3ZRAS14mhjS781THhyq5ZpQiR9d85r51jKwOihYW4Ec8rSeRrgo 8apPdXlJXjKwLgXSxtcj5kX00MY9ON5600doEoxR/wMlKvJ8bRvETN/vuXJ6IztrL+vE T9ET20ZkqwqZihXvuWr3hJZ/y807xKm3i5Gg92svKH9i5FP+qD1tnxe9x7GGaCAJxbDe Zj33d3IlpacTETe4o93rfvQ0XCT4eA3VXaccC7jST8HL9DrWvT0qDUW8UEJT6YfuOWJr cprSYeENiK10eu1Jhkeckp8pCyhItdjb19ETStH2arH+lwkNkT0HeXt9ZMnsstfpzfrz tqDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gM+fwaD4; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-172609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w3-20020aa7d283000000b005726fb3e1absi6387226edq.23.2024.05.07.18.46.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 18:46:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gM+fwaD4; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-172609-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id BD3261F2302C for ; Wed, 8 May 2024 01:46:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1254CAD52; Wed, 8 May 2024 01:45:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="gM+fwaD4" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC60D1A2C2C; Wed, 8 May 2024 01:45:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715132752; cv=none; b=OR1OWbcHQ04hRVz+kL9ubD7hgYkYdvWNSoBJOWxcZnPjTKwBPyPpKYnjCDMtabYQWTuMakFtaLnCAOOXboMJrPVq4KvdBQR/s0HISkvpwrCHne96QV06hVG7o/ze6g4g1JgpFRPsSHElN4NfnyuaVZp0p4NaTlex1M/qPA9j0Qo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715132752; c=relaxed/simple; bh=4xlj5SmF8Y4YtN11odRrshnX4/XsOJ/kKNfAOIt7Q18=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aBBLzhWOhmIGeZGcL0+6Vp4uh3qyGRSM0YZWUPN5Jqe+mDlZFGv9E4WrZMa4EfOZHEXED37gHN2xOB0mlwmfDRccDCQv/gBE+akvBUCVM62IS6S0hVIJXbHOmfmJP+2hK0a4aT7Uz99EvRRB/1JuA4Bn1i1dynm4VG+44HxY8h0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=gM+fwaD4; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4480ifnH026818; Wed, 8 May 2024 01:45:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=gG/Mg01aPwawcgX1ZVQCj 4coaePzrbjJoyz1wJasTvE=; b=gM+fwaD4tM0RjtfcYP1LWQ1VSIkhBTZNNANjy Sptr9LGGs/PtP8gR2bUulFwbKfVWwD3YOYgBJdBY8+oyIDFUUgN43qdi0M2MHSHv pByZCJJ/wnFTKK3Vb9eYePJjfw3luxta1AhHMALayDeigr0wRktauvnCpKKX/DVV 9fDDmhZZxQvbZbEk4MCLkUwIuxG4Tc0q8ZeC9mxWM82/yLpWcwXq/KL0QugtcL7U 6Ucs81QnVhWzBgI7HdbCsdvHrjd1B0xiL2PdQ+ePlU6bTJFliV5SSzgTianFLfVD EE+eXS6A01iICRXHu0BInZm/KnWenljpuwr7bKOYosSJJeIXA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xysg9gqfa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 May 2024 01:45:32 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4481jVtg012762 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 May 2024 01:45:31 GMT Received: from hu-mdtipton-lv.qualcomm.com (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 7 May 2024 18:45:31 -0700 Date: Tue, 7 May 2024 18:45:30 -0700 From: Mike Tipton To: Konrad Dybcio CC: Bjorn Andersson , Georgi Djakov , Shawn Guo , Marijn Suijten , , , , Stephan Gerhold , Subject: Re: [PATCH 4/4] interconnect: qcom: icc-rpm: Remodel how QoS settings are stored Message-ID: <20240508014530.GB25316@hu-mdtipton-lv.qualcomm.com> References: <20240326-topic-rpm_icc_qos_cleanup-v1-0-357e736792be@linaro.org> <20240326-topic-rpm_icc_qos_cleanup-v1-4-357e736792be@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240326-topic-rpm_icc_qos_cleanup-v1-4-357e736792be@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: OLkM26eJWXmNATBEUBk8KNyTob3b5lWa X-Proofpoint-ORIG-GUID: OLkM26eJWXmNATBEUBk8KNyTob3b5lWa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-07_16,2024-05-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 malwarescore=0 bulkscore=0 mlxscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 priorityscore=1501 clxscore=1011 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405080011 Hi Konrad, On Tue, Mar 26, 2024 at 08:42:35PM +0100, Konrad Dybcio wrote: > Currently, the QoS settings are stored in the node data, even though > they're a property of the bus/provider instead. Moreover, they are only > needed during the probe step, so they can be easily moved into struct > qcom_icc_desc. The QoS settings *are* fundamentally a property of the node. The nodes are 1:1 with the NOC ports. And the QoS settings tune the priority of the data coming out of those ports. So, logically speaking, the QoS data does belong in the node structs along with the rest of the data for that node and port. Only a subset of NOC ports support configurable QoS, but for those ports that do it's a property of the port itself. Those settings impact just that specific port and nothing else. The current method of directly embedding the qcom_icc_qos_data struct into qcom_icc_node isn't optimal, since that data is irrelevant for ports that don't support it. So, the size could be optimized by converting qcom_icc_node::qos into a pointer instead. But I don't think we should separate the QoS settings from node struct entirely. It makes it very difficult to understand which QoS settings are impacting which port. For example... > > diff --git a/drivers/interconnect/qcom/msm8996.c b/drivers/interconnect/qcom/msm8996.c > index 788131400cd1..96c8ea8edd7a 100644 > --- a/drivers/interconnect/qcom/msm8996.c > +++ b/drivers/interconnect/qcom/msm8996.c > @@ -43,11 +43,7 @@ static struct qcom_icc_node mas_pcie_0 = { > .buswidth = 8, > .mas_rpm_id = 65, > .slv_rpm_id = -1, > - .qos.ap_owned = true, > - .qos.qos_mode = NOC_QOS_MODE_FIXED, > - .qos.areq_prio = 1, > - .qos.prio_level = 1, > - .qos.qos_port = 0, > + .ap_owned = true, > .num_links = ARRAY_SIZE(mas_a0noc_common_links), > .links = mas_a0noc_common_links > }; [...] > > +static const struct qcom_icc_qos_data a0noc_qos_data[] = { > + { > + .qos_port = 0, > + .qos_mode = NOC_QOS_MODE_FIXED, > + .areq_prio = 1, > + .prio_level = 1, > + .urg_fwd_en = false, > + .limit_commands = false, > + }, { How can I tell that these a0noc_qos_data[0] settings are for the mas_pcie_0 port? It's not possible from the code anymore. *We* could figure it out internally by looking at the NOC SWI to determine the qos_port index. But this should be obvious from the code itself. > + .qos_port = 1, > + .qos_mode = NOC_QOS_MODE_FIXED, > + .areq_prio = 1, > + .prio_level = 1, > + .urg_fwd_en = false, > + .limit_commands = false, > + }, { > + .qos_port = 2, > + .qos_mode = NOC_QOS_MODE_FIXED, > + .areq_prio = 1, > + .prio_level = 1, > + .urg_fwd_en = false, > + .limit_commands = false, > + }, > +}; > +