lkml.org 
[lkml]   [2021]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 2/3] kfence: maximize allocation wait timeout duration
Date
From: Kefeng Wang
> Sent: 16 September 2021 02:21
>
> We found kfence_test will fails  on ARM64 with this patch with/without
> CONFIG_DETECT_HUNG_TASK,
>
> Any thought ?
>
...
> >>       /* Enable static key, and await allocation to happen. */
> >>       static_branch_enable(&kfence_allocation_key);
> >>   -    wait_event_timeout(allocation_wait, atomic_read(&kfence_allocation_gate), HZ);
> >> +    if (sysctl_hung_task_timeout_secs) {
> >> +        /*
> >> +         * During low activity with no allocations we might wait a
> >> +         * while; let's avoid the hung task warning.
> >> +         */
> >> +        wait_event_timeout(allocation_wait, atomic_read(&kfence_allocation_gate),
> >> +                   sysctl_hung_task_timeout_secs * HZ / 2);
> >> +    } else {
> >> +        wait_event(allocation_wait, atomic_read(&kfence_allocation_gate));
> >> +    }
> >>         /* Disable static key and reset timer. */
> >>       static_branch_disable(&kfence_allocation_key);

It has replaced a wait_event_timeout() with a wait_event().

That probably isn't intended.
Although I'd expect their to be some test for the wait being
signalled or timing out.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2021-09-16 17:46    [W:1.082 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site