From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752940AbbGQTXz (ORCPT ); Fri, 17 Jul 2015 15:23:55 -0400 Received: from mail-wg0-f51.google.com ([74.125.82.51]:33446 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725AbbGQTXx (ORCPT ); Fri, 17 Jul 2015 15:23:53 -0400 Date: Fri, 17 Jul 2015 21:23:48 +0200 From: Ingo Molnar To: linux-kernel@vger.kernel.org, Dave Hansen Cc: Andy Lutomirski , Andrew Morton , Dave Hansen , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner Subject: Re: [PATCH 1/2] x86/fpu, fork: Dynamically allocate 'struct fpu' Message-ID: <20150717192348.GB24300@gmail.com> References: <1437128892-9831-1-git-send-email-mingo@kernel.org> <1437128892-9831-2-git-send-email-mingo@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437128892-9831-2-git-send-email-mingo@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ingo Molnar wrote: > From: Dave Hansen > > The FPU rewrite removed the dynamic allocations of 'struct fpu'. > But, this potentially wastes massive amounts of memory (2k per > task on systems that do not have AVX-512 for instance). > > Instead of having a separate slab, this patch just appends the > space that we need to the 'task_struct' which we dynamically > allocate already. This saves from doing an extra slab > allocation at fork(). > > The only real downside here is that we have to stick everything > and the end of the task_struct. But, I think the BUILD_BUG_ON()s > I stuck in there should keep that from being too fragile. > > Cc: Andy Lutomirski > Cc: Borislav Petkov > Cc: H. Peter Anvin > Cc: Linus Torvalds > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: dave@sr71.net > Link: http://lkml.kernel.org/r/20150716191437.A334FF2E@viggo.jf.intel.com > Signed-off-by: Ingo Molnar Dave, can I put your Signed-off-by into this patch? I have already tested these two patches and they are looking good here - so unless you can see some breakage or other problem I'd prefer it to keep it two patches. Thanks, Ingo