From: Thomas Graf <tgraf@suug.ch>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, fengguang.wu@intel.com,
wfg@linux.intel.com, lkp@01.org
Subject: Re: [PATCH 2/3] rhashtable-test: retry insert operations in threads
Date: Tue, 1 Sep 2015 16:13:05 +0200 [thread overview]
Message-ID: <20150901141305.GA11564@pox.localdomain> (raw)
In-Reply-To: <20150901140341.GA13757@gondor.apana.org.au>
On 09/01/15 at 10:03pm, Herbert Xu wrote:
> On Tue, Sep 01, 2015 at 03:56:18PM +0200, Phil Sutter wrote:
> >
> > Looking at rhashtable_test.c, I see the initial table size is 8 entries.
> > 70% of that is 5.6 entries, so background expansion is started after the
> > 6th entry has been added, right? Given there are 10 threads running
> > which try to insert 50k entries at the same time, I don't think it's
> > unlikely that three more entries are inserted before the background
> > expansion completes.
>
> Yes but in that case the GFP_ATOMIC allocation should work because
> the table is so small anyway.
You can easily trigger this outside of the testsuite as well. Open
10K Netlink sockets in a loop and the creation of the sockets will
fail way before memory pressure kicks in.
I agree with you that the user should never retry on memory failure.
That's why I suggested to differentiate between a "permanent" failure
(memory pressure) and non-permanent failure (temporary overload on
background expansion). Hence the proposed difference of return codes
ENOMEM and EBUSY to report this back to the API user.
next prev parent reply other threads:[~2015-09-01 14:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 10:28 [PATCH 1/3] rhashtable-test: add cond_resched() to thread test Phil Sutter
2015-08-28 10:28 ` [PATCH 2/3] rhashtable-test: retry insert operations in threads Phil Sutter
2015-08-28 11:09 ` Thomas Graf
2015-08-28 11:13 ` Phil Sutter
2015-08-28 13:34 ` Phil Sutter
2015-08-28 22:43 ` Thomas Graf
2015-08-29 9:07 ` Phil Sutter
2015-08-30 7:47 ` Herbert Xu
2015-08-31 11:00 ` Phil Sutter
2015-09-01 11:43 ` Herbert Xu
2015-09-01 12:46 ` Phil Sutter
2015-09-01 13:00 ` Herbert Xu
2015-09-01 13:40 ` Eric Dumazet
2015-09-01 13:43 ` Phil Sutter
2015-09-01 13:50 ` Herbert Xu
2015-09-01 13:56 ` Phil Sutter
2015-09-01 14:03 ` Herbert Xu
2015-09-01 14:13 ` Thomas Graf [this message]
2015-09-01 14:16 ` Herbert Xu
2015-09-01 14:51 ` Thomas Graf
2015-09-02 2:00 ` Herbert Xu
2015-09-02 7:07 ` Thomas Graf
2015-09-10 8:03 ` Herbert Xu
2015-09-10 10:05 ` Phil Sutter
2015-08-28 10:28 ` [PATCH 3/3] rhashtable-test: calculate max_entries value by default Phil Sutter
2015-08-28 11:11 ` Thomas Graf
2015-08-28 11:03 ` [PATCH 1/3] rhashtable-test: add cond_resched() to thread test Thomas Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150901141305.GA11564@pox.localdomain \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=fengguang.wu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=netdev@vger.kernel.org \
--cc=wfg@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).