From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753128AbdBGHao (ORCPT ); Tue, 7 Feb 2017 02:30:44 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34621 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751748AbdBGHan (ORCPT ); Tue, 7 Feb 2017 02:30:43 -0500 Date: Tue, 7 Feb 2017 08:30:38 +0100 From: Ingo Molnar To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, Andrew Morton , Linus Torvalds , Mike Galbraith , Oleg Nesterov , Peter Zijlstra , Thomas Gleixner Subject: Re: [PATCH 18/89] sched/core: Move task->mm handling methods to Message-ID: <20170207073038.GA24519@gmail.com> References: <1486387772-18837-1-git-send-email-mingo@kernel.org> <1486387772-18837-19-git-send-email-mingo@kernel.org> <20170206142842.GB17008@infradead.org> <20170206224354.GC6061@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170206224354.GC6061@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ingo Molnar wrote: > > * Christoph Hellwig wrote: > > > On Mon, Feb 06, 2017 at 02:28:21PM +0100, Ingo Molnar wrote: > > > Move the following task->mm helper APIs into a new header file, > > > , to further reduce the size and complexity > > > of : > > > > Is there any good reason why they can't just go into linux/mm.h? > > So mm.h is pretty large already, and I wanted to preserve the natural API and > header separation that was the result of these APIs being in sched.h. Many > smaller headers are so much easier to maintain, and they are much more readable > as well in my experience. The other big reason is that putting these APIs (mmget()/mmput()/etc.) into mm.h would cause mm.h to include sched.h, which would make the whole major kernel header coupling situation I'm trying to improve with this series so much worse all around. The current stats are: is included in almost as many files as , and about half of them don't include . So adding these APIs would significantly bloat the kernel in the header build space. So we really don't want to include sched.h in mm.h. Thanks, Ingo