From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751346AbdBLPXv (ORCPT ); Sun, 12 Feb 2017 10:23:51 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:36466 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751225AbdBLPXu (ORCPT ); Sun, 12 Feb 2017 10:23:50 -0500 Date: Sun, 12 Feb 2017 16:23:36 +0100 (CET) From: Thomas Gleixner To: Hoeun Ryu cc: Andrew Morton , Michal Hocko , Ingo Molnar , Andy Lutomirski , Kees Cook , "Eric W. Biederman" , Oleg Nesterov , Mateusz Guzik , linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH v6] fork: free vmapped stacks in cache when cpus are offline In-Reply-To: <1486904770-30653-1-git-send-email-hoeun.ryu@gmail.com> Message-ID: References: <1486904770-30653-1-git-send-email-hoeun.ryu@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 12 Feb 2017, Hoeun Ryu wrote: > Using virtually mapped stack, kernel stacks are allocated via vmalloc. > In the current implementation, two stacks per cpu can be cached when > tasks are freed and the cached stacks are used again in task duplications. > but the cached stacks may remain unfreed even when cpu are offline. > By adding a cpu hotplug callback to free the cached stacks when a cpu > goes offline, the pages of the cached stacks are not wasted. > > Signed-off-by: Hoeun Ryu > Acked-by: Michal Hocko Reviewed-by: Thomas Gleixner