From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968443AbdEWP0c (ORCPT ); Tue, 23 May 2017 11:26:32 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:36272 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757861AbdEWP01 (ORCPT ); Tue, 23 May 2017 11:26:27 -0400 Date: Tue, 23 May 2017 11:26:25 -0400 (EDT) Message-Id: <20170523.112625.33559883707681029.davem@davemloft.net> To: oneukum@suse.com Cc: jim_baxter@mentor.com, bjorn@mork.no, linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC V1 1/1] net: cdc_ncm: Reduce memory use when kernel memory low From: David Miller In-Reply-To: <1495528968.2174.2.camel@suse.com> References: <04bc5b49-9282-a6ca-2b95-fb8fc9750555@mentor.com> <20170522.115426.1239443379414364630.davem@davemloft.net> <1495528968.2174.2.camel@suse.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 23 May 2017 07:44:53 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oliver Neukum Date: Tue, 23 May 2017 10:42:48 +0200 > Am Montag, den 22.05.2017, 11:54 -0400 schrieb David Miller: >> >> Unfortunately without a real notifier of some sort (there isn't one, and >> it isn't actually easy to come up with a clean way to do this which is >> probably why it doesn't exist yet in the first place) I really cannot >> recommend anything better. >> >> That being said, probably for the time being we should just backoff each >> and every request, always trying initially to do the higher order thing. > > We could use a counter. After the first failure, do it once, after the > second twice and so on. And reset the counter as a higher order > allocation works. (just bound it somewhere) So an exponential backoff, that might work.