RE: rhashtable: ENOMEM errors when hit with a flood of insertions

2015-12-03 Thread David Laight
From: Herbert Xu > Sent: 03 December 2015 12:51 > On Mon, Nov 30, 2015 at 06:18:59PM +0800, Herbert Xu wrote: > > > > OK that's better. I think I see the problem. The test in > > rhashtable_insert_rehash is racy and if two threads both try > > to grow the table one of them may be tricked into

Re: rhashtable: ENOMEM errors when hit with a flood of insertions

2015-12-03 Thread Eric Dumazet
On Thu, 2015-12-03 at 20:51 +0800, Herbert Xu wrote: > On Mon, Nov 30, 2015 at 06:18:59PM +0800, Herbert Xu wrote: > > > > OK that's better. I think I see the problem. The test in > > rhashtable_insert_rehash is racy and if two threads both try > > to grow the table one of them may be tricked

Re: rhashtable: ENOMEM errors when hit with a flood of insertions

2015-12-03 Thread Herbert Xu
On Thu, Dec 03, 2015 at 08:08:39AM -0800, Eric Dumazet wrote: > > Well, it will fail before this point if memory is fragmented. Indeed, I was surprised that it even worked up to that point, possibly because the previous resizes might have actually been done in process context. > Anyway,