lkml.org 
[lkml]   [2017]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm -V2] mm, swap: Fix race between swapoff and some swap operations
On Thu, 14 Dec 2017 16:17:18 +0100 Michal Hocko <mhocko@kernel.org> wrote:

> > as fast as possible, SRCU instead of reference count is used to
> > implement get/put_swap_device(). From get_swap_device() to
> > put_swap_device(), the reader side of SRCU is locked, so
> > synchronize_srcu() in swapoff() will wait until put_swap_device() is
> > called.
>
> It is quite unfortunate to pull SRCU as a dependency to the core kernel.
> Different attempts to do this have failed in the past. This one is
> slightly different though because I would suspect that those tiny
> systems do not configure swap. But who knows, maybe they do.
>
> Anyway, if you are worried about performance then I would expect some
> numbers to back that worry. So why don't simply start with simpler
> ref count based and then optimize it later based on some actual numbers.
> Btw. have you considered pcp refcount framework. I would suspect that
> this would give you close to SRCU performance.

<squeaky-wheel>Or use stop_kernel() ;)</squeaky-wheel>

\
 
 \ /
  Last update: 2017-12-14 21:43    [W:0.065 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site