Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1660789rdh; Mon, 25 Sep 2023 22:30:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTHhEdCOS4vXfIYjm5gUdxic/oGM4pngQrWwTIZC0szQH1z85Fpocmg3mQZEN1h7Ht/uI8 X-Received: by 2002:a05:6a00:392a:b0:68e:2c2a:aa1d with SMTP id fh42-20020a056a00392a00b0068e2c2aaa1dmr2582251pfb.11.1695706224234; Mon, 25 Sep 2023 22:30:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695706224; cv=none; d=google.com; s=arc-20160816; b=mlO9Nydvr0GBpLOyKwmncvfIEe98c7UksgNxn9cTxDuQQl61Gs1EvkPb4grDAB8wpp 0q/vxxvJ8Z66VK3faszDJGgosoc35KubN7Is2jH963jUmOgW5vQhlAShx1Dhw1WFF6Kj mstDQ0NIXxcvzTRW9LIfYOU9rt18oK4ET/oOKSUF3BmTtvqushCKdkERzOTTfaPT4FMt pbnfHZgPGPnD5s6cexwWJg1GwPRdGzfxQ55s49ipnhW8kQXt9Q6INXh2+3iGoD98Skpa jN5inf2XuJPkMq4P6SaAQgJtWqFY28N/QsiV8kNXs+YcY+AsoOwBWn51RV8+ksYJ2cC3 qHqQ== 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 :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=9WRP/dH5LzRyecuJLSulsR2WIEaltd6yZiyLu9pOr44=; fh=YdzrStoX5UNhTpcdlwb5R/xYNGFGiR1hfVt+XotJQmY=; b=xZ0TR2FVPh7YZk9u090dAGMMlVulEtJyET8V75WlTM433R6hfXuuaBzT9bjfQ92iaa 50QfiKT5b2bRb7Q+zihMvGj5n78GxWDkfMTX3K2m5gBSS+ykkMmrhzDhVmy2xNbKtGyq lftbeKXew3jhOYptED18weqYjTi23DZoadxTTZ8F34rHYtEQbvlLbHj72n1WP6z9H4FK 4PDGCaVp2bXy/Ts2U+GRfYyEHjZC7KuRui9bs4F64TUJxZq7ekaZkZG+d7RQTXRWCw31 HOfprNmLtrUQl4GHzbdcUCLmoOhy9DPjK8qiT1Orq0oOTwq63DQIfl/rCQPPU0x+C9S7 9/Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MfbXRJkd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id y72-20020a638a4b000000b00565e56713c7si12124700pgd.91.2023.09.25.22.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 22:30:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MfbXRJkd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E5A278076675; Mon, 25 Sep 2023 16:55:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbjIYXzz (ORCPT + 99 others); Mon, 25 Sep 2023 19:55:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjIYXzz (ORCPT ); Mon, 25 Sep 2023 19:55:55 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69D7FFB; Mon, 25 Sep 2023 16:55:48 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38PNddmU003441; Mon, 25 Sep 2023 23:55:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=9WRP/dH5LzRyecuJLSulsR2WIEaltd6yZiyLu9pOr44=; b=MfbXRJkdMSjbeT3E5Tvi6NDku2B1FaLjc2K39/8KHnMz3yQ7702e0b4Ovn+4kMFknUKz wuNcvexdGn8EM0KRJKykDZuxOBbNRZv4FbqOiAgHzfmp/EbBTofwsLAuwp62QGQDjA7b IeFbC0sxcX4rrhrbgGjEQUEqzYH7uqWfz0q72dr172jkYtQu72XF+SBE4/ConN3i7mEB DOqYZ8el/RLNE3zMXPDLS0HX9qOzrWzY3eRIMQs2iRk2zg7zpy03Yiif3u6JNEVg1Bzv 1aHftk4de7XfB7tAVeELxgZ/tjotmUPAQ29xHpuGv0o4uQhB0iEiuQIyf70uaEWtlsqy tw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tb72shu55-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Sep 2023 23:55:40 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38PNtdAH023250 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Sep 2023 23:55:39 GMT Received: from [192.168.142.6] (10.80.80.8) 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.1118.36; Mon, 25 Sep 2023 16:55:39 -0700 Message-ID: Date: Mon, 25 Sep 2023 16:55:38 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V2 net-next 2/2] net: qrtr: Add support for processing DEL_PROC type control message Content-Language: en-US To: Sricharan Ramabadhran , , , , , , , , , , References: <20230920053317.2165867-1-quic_srichara@quicinc.com> <20230920053317.2165867-3-quic_srichara@quicinc.com> <349a7b1c-915f-4f58-260f-900aa7e3db65@quicinc.com> <0db026e7-6017-83ed-4071-c2ea6d72e3d7@quicinc.com> From: Chris Lew In-Reply-To: <0db026e7-6017-83ed-4071-c2ea6d72e3d7@quicinc.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: 4QfOrP3wocDMjFYvr6tmtwL2UN1bdoEs X-Proofpoint-ORIG-GUID: 4QfOrP3wocDMjFYvr6tmtwL2UN1bdoEs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-25_18,2023-09-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1015 malwarescore=0 adultscore=0 mlxlogscore=740 spamscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309250184 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 25 Sep 2023 16:55:55 -0700 (PDT) On 9/23/2023 6:49 PM, Sricharan Ramabadhran wrote: >>>    */ >>>   struct qrtr_node { >>>       struct mutex ep_lock; >>> @@ -134,6 +138,9 @@ struct qrtr_node { >>>       struct sk_buff_head rx_queue; >>>       struct list_head item; >>> +    struct kthread_worker kworker; >>> +    struct task_struct *task; >>> +    struct kthread_work read_data; >> >> I think our own kthread here might have been overkill. I forget why we >> needed it instead of using a workqueue. > >   I added a workqueue here because endpoint post is getting called from >   atomic contexts and below DEL_PROC handling acquires qrtr_tx_lock. Got it, I think deferring the processing makes sense. I was more focusing on the fact that we are creating our own kthread instead of using the system workqueues. Prior to commit e04df98adf7d ("net: qrtr: Remove receive worker"), this was a work_struct. I think we should keep it as a work_struct until we can motivate why a qrtr_node needs it's own kthread.