From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx177.postini.com [74.125.245.177]) by kanga.kvack.org (Postfix) with SMTP id 1FD3F6B008C for ; Sun, 26 May 2013 07:45:18 -0400 (EDT) Received: by mail-ob0-f171.google.com with SMTP id ef5so7063146obb.2 for ; Sun, 26 May 2013 04:45:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <537407790857e8a5d4db5fb294a909a61be29687.1369529143.git.aquini@redhat.com> References: <537407790857e8a5d4db5fb294a909a61be29687.1369529143.git.aquini@redhat.com> From: KOSAKI Motohiro Date: Sun, 26 May 2013 07:44:56 -0400 Message-ID: Subject: Re: [PATCH 01/02] swap: discard while swapping only if SWAP_FLAG_DISCARD_PAGES Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Rafael Aquini Cc: LKML , "linux-mm@kvack.org" , Andrew Morton , Hugh Dickins , shli@kernel.org, kzak@redhat.com, Jeff Moyer , "riel@redhat.com" , Larry Woodman , Mel Gorman > + /* > + * By flagging sys_swapon, a sysadmin can tell us to > + * either do sinle-time area discards only, or to just > + * perform discards for released swap page-clusters. > + * Now it's time to adjust the p->flags accordingly. > + */ > + if (swap_flags & SWAP_FLAG_DISCARD_ONCE) > + p->flags &= ~SWP_PAGE_DISCARD; > + else if (swap_flags & SWAP_FLAG_DISCARD_PAGES) > + p->flags &= ~SWP_AREA_DISCARD; When using old swapon(8), this code turn off both flags, right? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org