From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756189AbYDGVlk (ORCPT ); Mon, 7 Apr 2008 17:41:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752091AbYDGVld (ORCPT ); Mon, 7 Apr 2008 17:41:33 -0400 Received: from courier.cs.helsinki.fi ([128.214.9.1]:38160 "EHLO mail.cs.helsinki.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956AbYDGVld (ORCPT ); Mon, 7 Apr 2008 17:41:33 -0400 Message-ID: <47FA94AE.4070803@cs.helsinki.fi> Date: Tue, 08 Apr 2008 00:39:58 +0300 From: Pekka Enberg User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Linus Torvalds CC: Hugh Dickins , Peter Zijlstra , Christoph Lameter , James Bottomley , Andrew Morton , FUJITA Tomonori , Jens Axboe , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi: fix sense_slab/bio swapping livelock References: <1207598115.29991.23.camel@lappy> <47FA8B5A.5090104@cs.helsinki.fi> <47FA8CB0.6070106@cs.helsinki.fi> <47FA937E.6000009@cs.helsinki.fi> In-Reply-To: <47FA937E.6000009@cs.helsinki.fi> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: >> I suspect the right thing to do is not to mark them for "IO", but mark >> them for "short-lived", and allow short-lived allocations that don't >> have extended lifetimes to succeed even when a "real" allocation >> wouldn't. Pekka Enberg wrote: > Yeah, makes sense. We do have GFP_TEMPORARY so we could associate this > new semantics with that. But the real problem here is how to do the > "allocate harder" part which, btw, sounds very similar to what Peter's > kmalloc reserve patches try to do... Actually, a trivial way to implement that is to have a few "emergency kmalloc" caches say for sizes 64, 128, 256, and 512 that have some pre-allocated pages into which these GFP_TEMPORARY allocations are allowed to dip into on OOM and OOM only. Pekka