lkml.org 
[lkml]   [2014]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/vmscan: Do not block forever at shrink_inactive_list().
On Tue, May 20, 2014 at 12:54:29PM +0900, Tetsuo Handa wrote:
> Dave Chinner wrote:
> > So, XFS should be passing kswapd context to the workqueue allocation
> > context. The patch below does this.
> >
> > Tetsuo-san, when it comes to problems involving XFS, you should
> > really CC xfs@oss.sgi.com because very few people really know how
> > XFS works and even fewer still know how it is supposed to interact
> > with memory reclaim....
>
> Thank you for the patch, but ...
>
> #define PF_KSWAPD 0x00040000 /* I am kswapd */
>
> static inline int current_is_kswapd(void)
> {
> return current->flags & PF_KSWAPD;
> }

> I think ((char) (current->flags & 0x00040000)) == 0.
> Your patch wants
>
> -args->kswapd = current_is_kswapd();
> +args->kswapd = (current_is_kswapd() != 0);

Thanks for pointing that out, but I think:

-static inline int current_is_kswapd(void)
+static inline bool current_is_kswapd(void)

is a better solution. It can only be true or false.

But regardless, I need to change the boolean options in that XFS
structure to be, well, booleans.

Cheers,

dave.

--
Dave Chinner
david@fromorbit.com


\
 
 \ /
  Last update: 2014-05-20 08:01    [W:0.174 / U:1.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site