| To: | Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] mm/vmscan: Do not block forever at shrink_inactive_list(). |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Tue, 20 May 2014 15:24:52 +1000 |
| Cc: | riel@xxxxxxxxxx, kosaki.motohiro@xxxxxxxxxxxxxx, fengguang.wu@xxxxxxxxx, kamezawa.hiroyu@xxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <201405200354.s4K3sTUx057458@xxxxxxxxxxxxxxxxxxx> |
| References: | <201405192340.FCD48964.OFQHOOJLVSFFMt@xxxxxxxxxxxxxxxxxxx> <20140520004449.GE18954@dastard> <201405200354.s4K3sTUx057458@xxxxxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
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@xxxxxxxxxxx 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@xxxxxxxxxxxxx
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] mm/vmscan: Do not block forever at shrink_inactive_list()., Tetsuo Handa |
|---|---|
| Next by Date: | [XFS updates] XFS development tree branch, xfs-feature-bit-cleanup, created. xfs-for-linus-3.15-rc5-1271-gab3e57b, xfs |
| Previous by Thread: | Re: [PATCH] mm/vmscan: Do not block forever at shrink_inactive_list()., Tetsuo Handa |
| Next by Thread: | Re: [PATCH] mm/vmscan: Do not block forever at shrink_inactive_list()., Andrew Morton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |