Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp523850rdb; Fri, 8 Sep 2023 08:00:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkBEGOQ/6sDd+4P6NvkTvVJ4wix7jtgk9jPnx5GabeLplzKsUc5GTbHj8FvKyE/d5nuIv5 X-Received: by 2002:a17:902:e805:b0:1c0:ee68:fc84 with SMTP id u5-20020a170902e80500b001c0ee68fc84mr3609464plg.26.1694185225997; Fri, 08 Sep 2023 08:00:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694185225; cv=none; d=google.com; s=arc-20160816; b=hIWZ+L0w2kZU3tbxaXD4aGeoIl7Pojeq2IvU1RLaPRL3o5opXUrPJuRE0LaYqnHKiu 81gL6l7OTXMjcg7p5e0K83SMZ29BXNh0+wGxootObu3jFhxpTueoivNLZ2hvo1X/blEr r5RNpFMiL3d+QgPqYxQynNUKGPHB1NV1A2i8/m0aJqa/Bch/a9es2Ys6xx7eu3+d2tyH Hm/6g6EfoARQcoLgQVQId2n0FNPiN+J3l4FCoGbRr2mS/92gd9e5A/Mq8T9YIedihjy+ zwUGSzswtDMYbjB6RZXIXVkdMoAYddcqOKdtLuu5Yi8/EzpP910OA8thqRo6g7KSFaaa XLaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=n+Wy3ELE58K780hhWcFbwdo3t/L9fFKiSYKSquEuQS0=; fh=L6GX+ag/NwSj7b38sfkDddoUmjOYNpzCi3B1/9lkU4w=; b=IajP94zp3rNXCvn882aMhy0qTrdA2Q9nS2WpvR64jnvdCYn7kQGLQkFFKCklX+9cxK fFiGYY6qCwNdjvckAzDpa+xJ+FQ8jHvP8q4xF8g2qEg9xQYAAuUo8rPug34y/tQstAsh 7bJBDJzSR9+4hlTANOde47VaTiwCyRK0Yn3qvpu/ntoHBWkYTPjM6bHDfudNfxhm+lLI uz1oCD/8+TirNTlgSqH93N6D8wAIvNx9xQ3iWCbgQuzoyv7FM0YIM7N3UYwzB0DOPofE +dgGH9wEr9Mqkkvfmz62lSU2gWqhTxdCxJyvZ4rsI3fy6h196hrIABGJ6M1xgCWHiI7n qezg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LvDZyAZS; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170903228e00b001ab29e00303si1681098plh.426.2023.09.08.08.00.17; Fri, 08 Sep 2023 08:00:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LvDZyAZS; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232883AbjIHIRU (ORCPT + 52 others); 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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