From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f72.google.com (mail-lf0-f72.google.com [209.85.215.72]) by kanga.kvack.org (Postfix) with ESMTP id 1BB7E6B0005 for ; Sun, 4 Mar 2018 15:18:50 -0500 (EST) Received: by mail-lf0-f72.google.com with SMTP id t67so4454782lfe.21 for ; Sun, 04 Mar 2018 12:18:50 -0800 (PST) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id i18sor2423829ljd.31.2018.03.04.12.18.48 for (Google Transport Security); Sun, 04 Mar 2018 12:18:48 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180216162809.30b2278f0cacefa66c95c1aa@linux-foundation.org> References: <47ab51e7-e9c1-d30e-ab17-f734dbc3abce@gmail.com> <20180216162809.30b2278f0cacefa66c95c1aa@linux-foundation.org> From: Vitaly Wool Date: Sun, 4 Mar 2018 12:18:47 -0800 Message-ID: Subject: Re: [PATCH] z3fold: limit use of stale list for allocation Content-Type: multipart/alternative; boundary="001a11471dfebce4fb05669bea24" Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Linux-MM , LKML , Oleksiy.Avramchenko@sony.com --001a11471dfebce4fb05669bea24 Content-Type: text/plain; charset="UTF-8" [sorry for answering only now, this email slipped through somehow] 2018-02-16 16:28 GMT-08:00 Andrew Morton : > On Sat, 10 Feb 2018 12:02:52 +0100 Vitaly Wool > wrote: > > > Currently if z3fold couldn't find an unbuddied page it would first > > try to pull a page off the stale list. The problem with this > > approach is that we can't 100% guarantee that the page is not > > processed by the workqueue thread at the same time unless we run > > cancel_work_sync() on it, which we can't do if we're in an atomic > > context. So let's just limit stale list usage to non-atomic > > contexts only. > > This smells like a bugfix. What are the end-user visible effects of > the bug? > > I have only seen this happening in real life once, and then z3fold ended up using a page which had been already freed and got blocked on a spinlock. ~Vitaly --001a11471dfebce4fb05669bea24 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
[sorry for answering only now, this email slipped through = somehow]

2018-= 02-16 16:28 GMT-08:00 Andrew Morton <akpm@linux-foundation.org= >:
On Sat, 10 = Feb 2018 12:02:52 +0100 Vitaly Wool <vitalywool@gmail.com> wrote:

> Currently if z3fold couldn't find an unbuddied page it would first=
> try to pull a page off the stale list. The problem with this
> approach is that we can't 100% guarantee that the page is not
> processed by the workqueue thread at the same time unless we run
> cancel_work_sync() on it, which we can't do if we're in an ato= mic
> context. So let's just limit stale list usage to non-atomic
> contexts only.

This smells like a bugfix.=C2=A0 What are the end-user visible effec= ts of
the bug?


I have only seen th= is happening in real life once, and then z3fold ended up using a page which= had been already freed and got blocked on a spinlock.

~Vitaly
--001a11471dfebce4fb05669bea24-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org