lkml.org 
[lkml]   [2021]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mm,shmem: Fix a typo in shmem_swapin_page()
Date
Hugh Dickins <hughd@google.com> writes:

> On Tue, 3 Aug 2021, Matthew Wilcox wrote:
>> On Tue, Aug 03, 2021 at 04:14:38PM +0800, Huang, Ying wrote:
>> > Matthew Wilcox <willy@infradead.org> writes:
>> > > But I REALLY REALLY REALLY want a reproducer. Right now, I have a hard
>> > > time believing this, or any of the other races can really happen.
>> >
>> > I think the race is only theoretical too. Firstly, swapoff is a rare
>> > operations in practice; secondly, the race window is really small.
>>
>> So do something to provoke it. Widen the window. Put an msleep(1000)
>> between *pagep = NULL and the call to get_swap_device(). That's assuming
>> that the swapon/swapoff loop that I proposed doesn't work. Did you
>> try it?
>
> I've been doing that swapon/swapoff loop for years, while running kernel
> builds on tmpfs going out to swap; for better or worse on baremetal not VM.
>
> You're right that few will ever need that level of reliability; but it
> has caught problems from time to time, and I do insist on fixing them.
>
> I'm not as insistent as you on wanting a reproducer; and we all take pride
> sometimes in fixing ever more inconceivable bugs. I'm not against that,
> but it's easy to end up with a fix more dangerous than what it claims to
> fix, rather like with random newbie cleanups.

Yes. I totally agree, bug fixing is hard.

Best Regards,
Huang, Ying

\
 
 \ /
  Last update: 2021-08-04 11:05    [W:0.096 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site