From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 303B4C4727C for ; Tue, 29 Sep 2020 22:53:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8706220756 for ; Tue, 29 Sep 2020 22:53:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="QDrVr+ul" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8706220756 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C836B6B005D; Tue, 29 Sep 2020 18:53:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C33C66B0062; Tue, 29 Sep 2020 18:53:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AFB936B0068; Tue, 29 Sep 2020 18:53:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0073.hostedemail.com [216.40.44.73]) by kanga.kvack.org (Postfix) with ESMTP id 966086B005D for ; Tue, 29 Sep 2020 18:53:15 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 50D8D8249980 for ; Tue, 29 Sep 2020 22:53:15 +0000 (UTC) X-FDA: 77317601550.05.wing76_05142432718d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 36D6A1802EF3A for ; Tue, 29 Sep 2020 22:53:15 +0000 (UTC) X-HE-Tag: wing76_05142432718d X-Filterd-Recvd-Size: 3362 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Sep 2020 22:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0S87uXkKSB7NmTMilPEy9DruRaasJPoFlfr0oUOWW2o=; b=QDrVr+ulZytJZEWhmEsh3fsECK pMppEFaHGkHc5E5WGoKjTNnKEbi5cC6zgA5bdLXE9MD4yvCTzW/sUyO0PyzE5Bd0LLG5Sa7u+eVc8 uU7jE/LQ7VRgje0N9tq9mXxXDaBJseyOZQFkix4H/xp5jWEat5b+jhwgLOk5d0DIVN4po/Y8dOjFh ZLrEmfxpDa2yUyRPw16ieUhvIcQZT/iqUAe6ahNSFIh6/4/OBcbuHYH6iS/Yyec340m+LgEdKgTc1 VN0sPMQUIAXKfyawdLV22ZBWO5pcKB6QzBanDv/TXtFCjFqAftVDYM73nq9tJhFrE5hoD1ii+7Aw3 f9rQaHmA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNOUd-0004Y3-VX; Tue, 29 Sep 2020 22:53:08 +0000 Date: Tue, 29 Sep 2020 23:53:07 +0100 From: Matthew Wilcox To: Andrew Morton Cc: Nick Piggin , Hugh Dickins , Peter Zijlstra , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] page_alloc: Fix freeing non-compound pages Message-ID: <20200929225307.GL20115@casper.infradead.org> References: <20200926213919.26642-1-willy@infradead.org> <20200928180307.7573f3b6128b5e3007dfc9f0@linux-foundation.org> <20200929011719.GD30994@casper.infradead.org> <20200928214656.be4a0f29961589c074e518fa@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200928214656.be4a0f29961589c074e518fa@linux-foundation.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Sep 28, 2020 at 09:46:56PM -0700, Andrew Morton wrote: > On Tue, 29 Sep 2020 02:17:19 +0100 Matthew Wilcox wrote: > > > On Mon, Sep 28, 2020 at 06:03:07PM -0700, Andrew Morton wrote: > > > On Sat, 26 Sep 2020 22:39:19 +0100 "Matthew Wilcox (Oracle)" wrote: > > > > > > > Here is a very rare race which leaks memory: > > > > > > Not worth a cc:stable? > > > > Yes, it probably should have been. > > Have you a feeling for how often this occurs? I doubt it happens often. I don't think I could construct a workload to make it happen frequently. Maybe more often with a virtualised workload where a thread can be preempted between instructions. > > I just assume the stablebot will > > pick up anything that has a Fixes: tag. > > We asked them not to do that for mm/ patches. Crazy stuff was getting > backported. That's a shame. I'll try to remember to cc them explicitly in the future. > > Although I'm now thinking of making that comment into kernel-doc and > > turning it into advice to the caller rather than an internal note to > > other mm developers. > > hm. But what action could the caller take? The explanatory comment > seems OK to me. Use compound pages instead of non-compound pages. Although Linus has asked that people stop using __get_free_pages(), so maybe that will be the direction we go in. https://lore.kernel.org/lkml/CA+55aFwyxJ+TOpaJZnC5MPJ-25xbLAEu8iJP8zTYhmA3LXFF8Q@mail.gmail.com/