From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 E131B390C98 for ; Wed, 4 Mar 2026 09:19:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772615983; cv=none; b=EOyiZ8Gj/NslwMYPzM71u0fAeunlpPpLlnTmy/px3gk7g30c1hJnzPGD95cbOxWR/OgAqm25M2Ax7eIwazvmCTMy9oHPs8uLnVWrJdPCqkH5XsyjYLYXFehFlvkumts//96TjzNOCkkovNJHhI39oC91DZqqDGAVzc3a5kyvzWQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772615983; c=relaxed/simple; bh=XPKtr4J6k7pZ4z43ytwPodbm3Gbt9cpmoxV6bUX7gxU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=nNMNW6PPPyz+m79XD/fv4Q0ZZWctYgTCcZqh+racqtcOcPCLTQiW2jZa2DikUmCzJ8+xPZZADPQ03hbCL6YsfvY8JVBZS/f25LPRu3YZohwPdiwKqqKx1amtaehvw+oYooUgD1A4IQGEpTv5B/1WPrTph9nFfT8hCTMtbGfjEMM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=kOptwILF; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jONjZsCL; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="kOptwILF"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jONjZsCL" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6245SQJU957040 for ; Wed, 4 Mar 2026 09:19:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= tY6xI5ZYU7KY53biVtTPNFc2Qmis908LZVYfVV6cXDM=; b=kOptwILFLloFu3w7 qS5wQMix1VsrJQZ1DGfvOREBfplYR5mYQ07rR3TyBkkOVjXb7hZ5JmcIeMvXfvRf HlWTWImKgDLc6Qa3gXNYIcLrxnnM0a0bmVufaSjhufDUPVbte2BBPnXKPxIr4jEr naMrn9wSy9yxZKiryGnlovD+Z/J4kJ8HDeKKxrgptrP5fZwYIRItxA2dWVyfR8Fe T7QrnU3QRVQelMtS7j3uhAY+IZVA3PDXhH+/2krbsQnrSPoOdLn7eV7IKWUQFj1t XC30V4WFgKiZGqyJ1nVLSBCFB24r+Jh4zyEEyzJb35qEihW23YbdkVG+0Ewd0t8Y EwIG6w== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cp6qga91r-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 04 Mar 2026 09:19:40 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2ae49120e74so32041535ad.3 for ; Wed, 04 Mar 2026 01:19:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1772615980; x=1773220780; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=tY6xI5ZYU7KY53biVtTPNFc2Qmis908LZVYfVV6cXDM=; b=jONjZsCLclMr+STfPSwHfex7wta5mKYeIfPDONPWiqURD6fZRDN+da0xZrwCQCK+/e +mbKgXjg68B4s7GINc0uTgdZ8E7zJpbL1kByZ9k+3b8wCh12zwnmxeJDU2fLaywYDkE2 8srCIvRFtGxRfemQRRJcm5Gw5aVuSiR8oUESJqhCc+xbQuiasRzgBQ07PQGqd2S1oYF6 n635BZbfOG6PrNDevRwXH67DIvOTi8QjqCU2ZN27TrDQ38AXKp8v2iauql5Fyai6p+bc cABygrgGYUWwcPX1eKb2Cw0STrSNtX1+yYoocRAQqnhIFtkao4pXIcEzUUQ4sApeRUpa ikIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772615980; x=1773220780; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tY6xI5ZYU7KY53biVtTPNFc2Qmis908LZVYfVV6cXDM=; b=tOm5GEorG5Wn2S54hSPIvBk7/Fyzs3fUydD4ZT68wPGwhaydNzBc9wxfUFjzEAY5Eg 1U/I3Wap0+RdAp00ECcp5cF+DHYRvsa8ceiMfNvLiQ1zl7ZSvGTuHG4MhFipxSHfdLbu /Fze4FAEBcVyVxI3vfd31ikvAq+djl8au5znOhT7Kp5vyiDZsavdWCsqZU7lVeofbSKe ZA+W3Aw7IqZheBqj/NazoVwGBUz0c1yhsQ5k4SHWh/Y23xjpdEkANnabC2QfumJu2C00 KNWIFqgbiI4afUHqgk6NGYEcBmzInxE0CYx+VbgC8JaTJKYVvbDQ0NeJsRJqsOoDNuYt jSbw== X-Forwarded-Encrypted: i=1; AJvYcCVi05OzMPh/R0s1yCItGpgFKn7vJQKkTdijWBHRY847VMUBcmo7Ud/CMyO6bN7255IshF1FfrF3fkEsVOE=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3by7ThL1hB50+PO4Sgg2QacqJjYpJfrB2/88cDUwKenLwo/Tn xCeAXTg4TRPqKB7xeLxvX86I9jiXHpA1XMUZe/S9ht1C3YgtfINq6C7e/W6B3x9BhcaljEQN/O8 NUNegkW/REL6JlsgjDXE9PGLC65qI72gnJc9jAg+074EvUfJZ5Cy1cJypkt2nhNbq088= X-Gm-Gg: ATEYQzxOOBLFxHrIeHjhJXuQjMbJw1CUnvxglygS6f/zXj89y3tGJvzgZSt/bi3iyBh DBp4rJdAEZxs6km8vKMsZJxRATV3QnUG1mSCPv6kQ9IFyaEv/816yAWSNuh5z6NplH3WG8qDeuv 9aWjrRDYukt9fpAGfk6SizWOM5AVgHGP2xpYm+3Jcwt37RdyyJyc6prM9tv5lwDKZGA3JKP00Yz 7hBcKT7A+eNvgF+nbOOGRYYrf6vbRg1Pm4G9Pe9zZfbwgX2+ayPcLlEQjDZcuxZZPBzvk8nFKec aLcheVWjPqZoE1DQa4MDq8C8UpaJt+sK4WZUgLsaoCrqlBKRM3CcFYOzYU5pGnKQAezr0BtVt6P QOj03Q89auFYVFPbJt9QbDB/1X3lkqZxpqshYulhTO4TnLhQ= X-Received: by 2002:a17:902:d503:b0:2aa:d5ea:4cfb with SMTP id d9443c01a7336-2ae6aa04db7mr16401045ad.9.1772615979849; Wed, 04 Mar 2026 01:19:39 -0800 (PST) X-Received: by 2002:a17:902:d503:b0:2aa:d5ea:4cfb with SMTP id d9443c01a7336-2ae6aa04db7mr16400755ad.9.1772615979358; Wed, 04 Mar 2026 01:19:39 -0800 (PST) Received: from [192.168.0.102] ([183.193.18.168]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2adfb69f244sm202462505ad.59.2026.03.04.01.19.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Mar 2026 01:19:38 -0800 (PST) Message-ID: <63796688-2733-4401-936b-3dc5a60f297e@oss.qualcomm.com> Date: Wed, 4 Mar 2026 17:19:32 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/1] scsi: ufs: core: Add support to notify userspace of UniPro QoS events To: =?UTF-8?B?UGV0ZXIgV2FuZyAo546L5L+h5Y+LKQ==?= , "beanhuo@micron.com" , "avri.altman@wdc.com" , "bvanassche@acm.org" , "martin.petersen@oracle.com" Cc: "liu.song13@zte.com.cn" , "huobean@gmail.com" , "ram.dwivedi@oss.qualcomm.com" , "tanghuan@vivo.com" , "linux-scsi@vger.kernel.org" , "quic_nguyenb@quicinc.com" , "alim.akhtar@samsung.com" , "chullee@google.com" , "linux-kernel@vger.kernel.org" , "adrian.hunter@intel.com" , "James.Bottomley@HansenPartnership.com" References: <20260301125116.808992-1-can.guo@oss.qualcomm.com> <20260301125116.808992-2-can.guo@oss.qualcomm.com> Content-Language: en-US From: Can Guo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzA0MDA2OSBTYWx0ZWRfX6QFGvKUYVPfM GecgGltXerY6kz2ZfqaL0jNBJ7cJ2jMszI2PJdmeFHjiSJIT1vzJAxo84+uRKvX4lMXDyuC6cBO 4hZXFMvVJ2omdRUoRSXA/B3piofqDj6q2+F8JJAmwy4Xj70+thEhvNzTS8vKdsBRzymVoZWh4Q0 qvR595ux+UX19iyA2H0JaM4ui4HPNLFQ+F8kb5zof2ChtW9NcbFHJx7evyQkemfuu7CFQfvKFoo MqxujyV5sXqNRI7s7Luh6+CewMsy0EpOvHkY3q1vx6efisW+8IzCH2PXct/AAnW67k3vupRdV/r uq1t9+GQG/nnX3wEbzPeAIhfTvoI20Tp9XJixB3e4gyuWoUd3B0bX7WR+w9jWwWkxnR2kj4fYB8 t4ou1M2mq663+iIJy+Paj7IvuXLZsoMq/f1PbQO8V+fCvvlXZDaMMXWBbXVR6yAMO8kReSxi/VY wCssykHVD1+dAzaAk6w== X-Authority-Analysis: v=2.4 cv=UJ3Q3Sfy c=1 sm=1 tr=0 ts=69a7f92c cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=4/OApUm1v7sVY8kc7hZvWg==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=C5vNK-4RAPWpfsQx8IEA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-ORIG-GUID: FpxckgausCmjdHO6kNo2cVPFCTtEYVla X-Proofpoint-GUID: FpxckgausCmjdHO6kNo2cVPFCTtEYVla X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-04_04,2026-03-03_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2603040069 On 3/4/2026 5:12 PM, Peter Wang (王信友) wrote: > > On Sun, 2026-03-01 at 04:51 -0800, Can Guo wrote: > > @@ -1768,3 +1768,26 @@ Description: > >                 ====================   =========================== > > > >                 The attribute is read only. > > + > > +What: > > /sys/bus/platform/drivers/ufshcd/*/dme_qos_notification > > +What:          /sys/bus/platform/devices/*.ufs/dme_qos_notification > > +Date:          February 2026 > > March 2026 Good catch > > > @@ -9097,6 +9106,12 @@ static int ufshcd_post_device_init(struct > > ufs_hba *hba) > > > >         /* UFS device is also active now */ > >         ufshcd_set_ufs_dev_active(hba); > > + > > +       /* Indicate that DME QoS Monitor has been reset */ > > +       atomic_set(&hba->dme_qos_notification, 0x1); > > > > Reset value should be 0? Bit[0] is used to communicate to userspace that DME QOS has been reset, see also the bit assignments explained in the patch. > > > @@ -1116,6 +1121,10 @@ struct ufs_hba { > >         int critical_health_count; > >         atomic_t dev_lvl_exception_count; > >         u64 dev_lvl_exception_id; > > + > > +       atomic_t dme_qos_notification; > > +       struct kernfs_node *dme_qos_sysfs_handle; > > Why is dme_qos_sysfs_handle necessary? > Wouldn't it be sufficient to use > sysfs_notify(&hba->dev->kobj, NULL, "dme_qos_notification"); > without checking whether dme_qos_sysfs_handle is NULL? sysfs_notify() cannot be used under atomic context, i.e., IRQ context. Thanks, Can Guo. > > Thanks > Peter > > ************* MEDIATEK Confidentiality Notice > ******************** > The information contained in this e-mail message (including any > attachments) may be confidential, proprietary, privileged, or otherwise > exempt from disclosure under applicable laws. It is intended to be > conveyed only to the designated recipient(s). Any use, dissemination, > distribution, printing, retaining or copying of this e-mail (including its > attachments) by unintended recipient(s) is strictly prohibited and may > be unlawful. If you are not an intended recipient of this e-mail, or believe > > that you have received this e-mail in error, please notify the sender > immediately (by replying to this e-mail), delete any and all copies of > this e-mail (including any attachments) from your system, and do not > disclose the content of this e-mail to any other person. Thank you!