From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751529AbdIOSFX (ORCPT ); Fri, 15 Sep 2017 14:05:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:38446 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751316AbdIOSFV (ORCPT ); Fri, 15 Sep 2017 14:05:21 -0400 Date: Fri, 15 Sep 2017 11:05:20 -0700 From: Andrew Morton To: Michal Hocko Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, oleg@redhat.com, peterz@infradead.org, mm-commits@vger.kernel.org, linux-mm@kvack.org Subject: Re: + include-linux-sched-mmh-uninline-mmdrop_async-etc.patch added to -mm tree Message-Id: <20170915110520.69c2b26b32f03f0c34e2d2a1@linux-foundation.org> In-Reply-To: <20170915071228.bw5f2atahrfhj7zp@dhcp22.suse.cz> References: <59bae45a.Fmr8uSXzjRP94/2V%akpm@linux-foundation.org> <20170915070731.y5ddmgtzvjz5aot3@dhcp22.suse.cz> <20170915071228.bw5f2atahrfhj7zp@dhcp22.suse.cz> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Sep 2017 09:12:28 +0200 Michal Hocko wrote: > On Fri 15-09-17 09:07:31, Michal Hocko wrote: > > On Thu 14-09-17 13:19:38, Andrew Morton wrote: > > > From: Andrew Morton > > > Subject: include/linux/sched/mm.h: uninline mmdrop_async(), etc > > > > > > mmdrop_async() is only used in fork.c. Move that and its support > > > functions into fork.c, uninline it all. > > > > Is this really an improvement? Why do we want to discourage more code > > paths to use mmdrop_async? It sounds like a useful api and it has been > > removed only because it lost its own user in oom code. Now that we have > > a user I would just keep it where it was before. > > Dohh, I have mixed mmput_async with mmdrop_async. Anyway I still think > that this is universal enough to have it in a header rather than hiding > it in fork.c Async free is a hack. It consumes more resources (runtime and memory) than a synchronous free. It introduces a risk of memory exhaustion when an unbounded number of async frees are pending, not yet serviced. It introduces a risk of unbounded latency when an unbounded number of async frees are serviced by the kernel thread. Synchronous frees are simply better, so we shouldn't encourage the use of async frees.