From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752216Ab2DBOme (ORCPT ); Mon, 2 Apr 2012 10:42:34 -0400 Received: from mail-gx0-f174.google.com ([209.85.161.174]:63102 "EHLO mail-gx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403Ab2DBOmc (ORCPT ); Mon, 2 Apr 2012 10:42:32 -0400 Date: Mon, 2 Apr 2012 07:41:56 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Arnd Bergmann cc: linaro-kernel@lists.linaro.org, Rik van Riel , "linux-mmc@vger.kernel.org" , Alex Lemberg , linux-kernel@vger.kernel.org, "Luca Porzio (lporzio)" , linux-mm@kvack.org, Hyojin Jeong , kernel-team@android.com, Yejin Moon Subject: Re: swap on eMMC and other flash In-Reply-To: <201204021145.43222.arnd@arndb.de> Message-ID: References: <201203301744.16762.arnd@arndb.de> <201203301850.22784.arnd@arndb.de> <201204021145.43222.arnd@arndb.de> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) 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 Mon, 2 Apr 2012, Arnd Bergmann wrote: > > Another option would be batched discard as we do it for file systems: > occasionally stop writing to swap space and scanning for areas that > have become available since the last discard, then send discard > commands for those. I'm not sure whether you've missed "swapon --discard", which switches on discard_swap_cluster() just before we allocate from a new cluster; or whether you're musing that it's no use to you because you want to repurpose the swap cluster to match erase block: I'm mentioning it in case you missed that it's already there (but few use it, since even done at that scale it's often more trouble than it's worth). Hugh