From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756785AbbAZTxh (ORCPT ); Mon, 26 Jan 2015 14:53:37 -0500 Received: from resqmta-po-05v.sys.comcast.net ([96.114.154.164]:35367 "EHLO resqmta-po-05v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753818AbbAZTxf (ORCPT ); Mon, 26 Jan 2015 14:53:35 -0500 Date: Mon, 26 Jan 2015 13:53:32 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@gentwo.org To: Vladimir Davydov cc: Andrew Morton , Pekka Enberg , David Rientjes , Joonsoo Kim , Johannes Weiner , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -mm 1/3] slub: don't fail kmem_cache_shrink if slab placement optimization fails In-Reply-To: <20150126193629.GA2660@esperanza> Message-ID: References: <3804a429071f939e6b4f654b6c6426c1fdd95f7e.1422275084.git.vdavydov@parallels.com> <20150126170147.GB28978@esperanza> <20150126193629.GA2660@esperanza> 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 Mon, 26 Jan 2015, Vladimir Davydov wrote: > We could do that, but IMO that would only complicate the code w/o > yielding any real benefits. This function is slow and called rarely > anyway, so I don't think there is any point to optimize out a page > allocation here. I think you already have the code there. Simply allow the sizeing of the empty_page[] array. And rename it.