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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6875EE57E3 for ; Fri, 8 Sep 2023 08:17:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232883AbjIHIRU (ORCPT ); Fri, 8 Sep 2023 04:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229490AbjIHIRU (ORCPT ); Fri, 8 Sep 2023 04:17:20 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AEF81BF5 for ; Fri, 8 Sep 2023 01:17:15 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25AE4C433C7; Fri, 8 Sep 2023 08:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694161035; bh=GIIukkGXSJUknYtMPc52M2adeSs4PcfC3iR01K7fLLs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=LvDZyAZSpYPU+uCUdaNrCl++dDO4xatgjj9wsj1lEwArZb3tQxraX1+wyg/PCuCk6 /T0+EfBh95dgxYPDKN6lLHbmhFPsdqtJ7Jp0JIu/85lgsE8/oEK3H/EyLncciBE+R0 5cAQ/+ynaDD4Wi3tGahnNF7arkb2m2mcO9Zc3sLYBHXJqy7A9yp4mh7Q5MqEcm/P4S C+nCRvGS2ipTqkNMne50XmQQt+Sbusk/2kItMHBKTbjGfRWtFcKbQxye81KyqcAwsT W3YZNHEASo4cCJ8Xr0hfasvEGPccSKRyE3Y6yzVjAnhBC4vFpNufTcNsUhSlAda3YA aAZfq+2xxxpJw== From: Kalle Valo To: Cc: , , Subject: Re: [PATCH v2] wifi: wilc1000: Added back-off algorithm to balance tx queue packets. References: <20230816162259.33342-1-prasurjya.rohansaikia@microchip.com> <871qfuvwzd.fsf@kernel.org> Date: Fri, 08 Sep 2023 11:18:42 +0300 In-Reply-To: (Prasurjya Rohansaikia's message of "Thu, 7 Sep 2023 17:01:35 +0000") Message-ID: <87cyytm61p.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org writes: > writes: > >> From: Prasurjya Rohan Saikia >> >> Added an algorithm to backoff the Tx Task when low memory scenario is >> triggered at firmware. During high data transfer from host, the firmware >> runs out of VMM memory, which is used to hold the frames from the host. >> So added flow control to delay the transmit from host side when there is >> not enough space to accomodate frames in firmware side. >> >> Signed-off-by: Prasurjya Rohan Saikia > > [...] > >> - } while (ret == WILC_VMM_ENTRY_FULL_RETRY && !wl->close); >> + if (ret != WILC_VMM_ENTRY_FULL_RETRY) >> + break; >> + /* Back off from sending packets for some time. >> + * schedule_timeout will allow RX task to run and free >> + * buffers. Setting state to TASK_INTERRUPTIBLE will >> + * put the thread back to CPU running queue when it's >> + * signaled even if 'timeout' isn't elapsed. This gives >> + * faster chance for reserved SK buffers to be freed >> + */ >> + set_current_state(TASK_INTERRUPTIBLE); >> + schedule_timeout(msecs_to_jiffies >> + (TX_BACKOFF_WEIGHT_MS)); >> + } while (!wl->close); > > Why not msleep_interruptible()? > > Thanks you for your suggestion. However, I decided to proceed with > schedule_timeout_interruptible() after testing and I will resubmit the patch. You need to provide more information than that. Please quote your emails properly and don't send HTML emails, our lists automaticall drop all HTML mail. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches