Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1618534

Re: [PATCH 2/4] mm: introduce memalloc_noreclaim_{save,restore}

From "Hillf Danton" <hillf.zj@alibaba-inc.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] mm: introduce memalloc_noreclaim_{save,restore}
Date 2017-04-07 09:40 +0200
Message-ID <ttwEV-474-13@gated-at.bofh.it> (permalink)
References <tsNRv-89c-3@gated-at.bofh.it> <tsNRv-89c-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On April 05, 2017 3:47 PM Vlastimil Babka wrote: 
> 
> The previous patch has shown that simply setting and clearing PF_MEMALLOC in
> current->flags can result in wrongly clearing a pre-existing PF_MEMALLOC flag
> and potentially lead to recursive reclaim. Let's introduce helpers that support
> proper nesting by saving the previous stat of the flag, similar to the existing
> memalloc_noio_* and memalloc_nofs_* helpers. Convert existing setting/clearing
> of PF_MEMALLOC within mm to the new helpers.
> 
> There are no known issues with the converted code, but the change makes it more
> robust.
> 
> Suggested-by: Michal Hocko <mhocko@suse.com>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---

Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/4] mm: introduce memalloc_noreclaim_{save,restore} Vlastimil Babka <vbabka@suse.cz> - 2017-04-05 09:50 +0200
  Re: [PATCH 2/4] mm: introduce memalloc_noreclaim_{save,restore} Michal Hocko <mhocko@kernel.org> - 2017-04-05 13:40 +0200
  Re: [PATCH 2/4] mm: introduce memalloc_noreclaim_{save,restore} "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-04-07 09:40 +0200

csiph-web