Re: low-memory crash with patch "capture a page under direct compaction"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 05, 2019 at 10:14:29PM -0500, Qian Cai wrote:
> I don't understand this part.
> 
> @@ -2279,14 +2286,24 @@ static enum compact_result compact_zone_order(struct
> zone *zone, int order,
>                 .ignore_skip_hint = (prio == MIN_COMPACT_PRIORITY),
>                 .ignore_block_suitable = (prio == MIN_COMPACT_PRIORITY)
>         };
> +       struct capture_control capc = {
> +               .cc = &cc,
> +               .page = NULL,
> +       };
> +
> +       if (capture)
> +               current->capture_control = &capc;
> 
> 
> That check will always be true as it is,
> 

It's a defensive check allowing for the possibility that
try_to_compact_pages() is passed NULL. Originally the structure was
different but I preserved the NULL check to avoid potential surprises.
It could be changed but I don't think it'll help. I aim to setup a machine
with your config today, try again to reproduce the problem and look at
the patch again to see can I spot how it could corrupt anything.

-- 
Mel Gorman
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux