From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:39570 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387640AbeKFD2u (ORCPT ); Mon, 5 Nov 2018 22:28:50 -0500 Date: Mon, 5 Nov 2018 19:07:42 +0100 From: David Sterba To: Omar Sandoval Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org, kernel-team@fb.com, David Sterba , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v9 0/6] Btrfs: implement swap file support Message-ID: <20181105180741.GE9136@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <20181019154318.GK16290@twin.jikos.cz> <20181022211327.GA10074@vader> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181022211327.GA10074@vader> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Oct 22, 2018 at 02:13:27PM -0700, Omar Sandoval wrote: > > > Omar Sandoval (6): > > > mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS > > > mm: export add_swap_extent() > > > vfs: update swap_{,de}activate documentation > > > Btrfs: prevent ioctls from interfering with a swap file > > > Btrfs: rename get_chunk_map() and make it non-static > > > Btrfs: support swap files > > > > Patches 1 and 2 now going through Andrew's tree, the btrfs part will be > > delayed and not merged to 4.20. This is a bit unfortuante, I was busy > > with the non-feature patches and other things, sorry. > > That's perfectly fine with me, than The 3 btrfs patches are now in misc-next. Setting up the swap file needs the extra steps to make sure it's a NOCOW file and preallocated, that's just 2 more commands using common tools. The surprise may come on an a multi-device filesystem when the chunks get spread over more devices and the user has no control over that. Reducing the file size until it fits is a workaround, tough not totally reliable. I've explored the error cases (balance, dev delete, adding more swapfiles). Also a stress test (make -j on kernel). The OOM killer was able to get the system back after each round after which I added one more swapfile, until the system was effectively dead. So the stability seems to be ok, we will need to document the usecase, constraints and how to properly set up the swapfile, and that's about it. Thanks.