From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: New TRIM/UNMAP tree published (2009-05-02) Date: Sun, 3 May 2009 08:48:47 -0600 Message-ID: <20090503144847.GR8822@parisc-linux.org> References: <1238683047-13588-1-git-send-email-willy@linux.intel.com> <49D8A3D7.5070507@panasas.com> <20090503061150.GF10704@linux.intel.com> <20090503071619.GP8822@parisc-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from palinux.external.hp.com ([192.25.206.14]:55261 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752751AbZECOss (ORCPT ); Sun, 3 May 2009 10:48:48 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Hugh Dickins Cc: Matthew Wilcox , Boaz Harrosh , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Garzik , linux-scsi@vger.kernel.org, Jens Axboe , Bartlomiej Zolnierkiewicz , Mark Lord On Sun, May 03, 2009 at 02:07:32PM +0100, Hugh Dickins wrote: > I notice OCZ hope to have updated Vertex firmware mid-May, > such that their TRIM support matches up with (y)ours. Excellent. > You have GFP_KERNEL allocations in your discard_fn()s. I believe that > allocations down at that level will need to be GFP_NOIO - the bio mempool > might be empty by this point, you don't want memory allocation to get into > submitting even more I/O to satisfy your discard_fn(). Does it need its > own mempool of reserve pages? My guess is that you can get away without > that, since a failed discard, though regrettable, loses no data. You make a good point. There's definitely still work to be done around error handling. OTOH, we could always do what IDE does ... static void idedisk_prepare_flush(struct request_queue *q, struct request *rq) { ide_drive_t *drive = q->queuedata; struct ide_cmd *cmd = kmalloc(sizeof(*cmd), GFP_ATOMIC); /* FIXME: map struct ide_taskfile on rq->cmd[] */ BUG_ON(cmd == NULL); -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."