From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756260Ab1GLWf6 (ORCPT ); Tue, 12 Jul 2011 18:35:58 -0400 Received: from smtp-out.google.com ([74.125.121.67]:51018 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756044Ab1GLWf5 (ORCPT ); Tue, 12 Jul 2011 18:35:57 -0400 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:date:from:x-x-sender:to:cc:subject: in-reply-to:message-id:references:user-agent:mime-version:content-type:x-system-of-record; b=rNbgoFuvXwoLiY9Gn//XvXeOHtzXqpIKCQhPLlYetWcx5owTUKng7dp26O9W1Lp1w OoTvK0x1Ac3PF8Nuhj6nQ== Date: Tue, 12 Jul 2011 15:35:41 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@sister.anvils To: Andrew Morton cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/12] mm: let swap use exceptional entries In-Reply-To: <20110618145546.12e175bf.akpm@linux-foundation.org> Message-ID: References: <20110618145546.12e175bf.akpm@linux-foundation.org> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 18 Jun 2011, Andrew Morton wrote: > On Tue, 14 Jun 2011 03:43:47 -0700 (PDT) Hugh Dickins wrote: > > > In an i386 kernel this limits its information (type and page offset) > > to 30 bits: given 32 "types" of swapfile and 4kB pagesize, that's > > a maximum swapfile size of 128GB. Which is less than the 512GB we > > previously allowed with X86_PAE (where the swap entry can occupy the > > entire upper 32 bits of a pte_t), but not a new limitation on 32-bit > > without PAE; and there's not a new limitation on 64-bit (where swap > > filesize is already limited to 16TB by a 32-bit page offset). > > hm. > > > Thirty > > areas of 128GB is probably still enough swap for a 64GB 32-bit machine. > > What if it was only one area? 128GB is close enough to 64GB (or, more > realistically, 32GB) to be significant. For the people out there who > are using a single 200GB swap partition and actually needed that much, > what happens? swapon fails? No, it doesn't fail: it just trims back the amount of swap that is used (and counted) to the maximum that the running kernel supports (just like when you switch between 64bit and 32bit-PAE and 32bit-nonPAE kernels using the same large swap device, the 64bit being able to access more of it than the 32bit-PAE kernel, and that more than the 32bit-nonPAE). I'd grown to think that the users of large amounts of RAM may like to have a little swap for leeway, but live in dread of the slow death that a large amount of swap can result in. Maybe that's just one class of user. I'd worry more about this if it were a new limitation for 64bit; but it's just a lower limitation for the 32bit-PAE case. If it actually proves to be an issue (and we abandon our usual mantra to go to 64bit), then I don't think having 32 distinct areas is sacrosanct: we can (configurably or tunably) lower the number of areas and increase their size; but I doubt we shall need to bother. ARM is getting LPAE? Then I guess this is a good moment to enforce the new limit. Hugh