From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754364AbcIHRWD (ORCPT ); Thu, 8 Sep 2016 13:22:03 -0400 Received: from mga14.intel.com ([192.55.52.115]:14907 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752327AbcIHRWC (ORCPT ); Thu, 8 Sep 2016 13:22:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,301,1470726000"; d="scan'208";a="6210778" From: "Huang\, Ying" To: "Kirill A. Shutemov" Cc: "Huang\, Ying" , Andrew Morton , , , , , , , Andrea Arcangeli , "Kirill A . Shutemov" , Hugh Dickins , "Shaohua Li" , Minchan Kim , Rik van Riel Subject: Re: [PATCH -v3 05/10] mm, THP, swap: Add get_huge_swap_page() References: <1473266769-2155-1-git-send-email-ying.huang@intel.com> <1473266769-2155-6-git-send-email-ying.huang@intel.com> <20160908111353.GD17331@node> Date: Thu, 08 Sep 2016 10:22:01 -0700 In-Reply-To: <20160908111353.GD17331@node> (Kirill A. Shutemov's message of "Thu, 8 Sep 2016 14:13:53 +0300") Message-ID: <87d1ketih2.fsf@yhuang-mobile.sh.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Kirill A. Shutemov" writes: > On Wed, Sep 07, 2016 at 09:46:04AM -0700, Huang, Ying wrote: >> From: Huang Ying >> >> A variation of get_swap_page(), get_huge_swap_page(), is added to >> allocate a swap cluster (512 swap slots) based on the swap cluster >> allocation function. A fair simple algorithm is used, that is, only the >> first swap device in priority list will be tried to allocate the swap >> cluster. The function will fail if the trying is not successful, and >> the caller will fallback to allocate a single swap slot instead. This >> works good enough for normal cases. > > For normal cases, yes. But the limitation is not obvious for users and > performance difference after small change in configuration could be > puzzling. If the difference of the number of the free swap clusters among multiple swap devices is significant, it is possible that some THP are split earlier than necessary because we fail to allocate the swap clusters for them. For example, this could be caused by big size difference among multiple swap devices. > At least this must be documented somewhere. I can add the above description in the patch description. Any other places do you suggest? Best Regards, Huang, Ying [snip] From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f71.google.com (mail-pa0-f71.google.com [209.85.220.71]) by kanga.kvack.org (Postfix) with ESMTP id 7F6BA6B0253 for ; Thu, 8 Sep 2016 13:22:02 -0400 (EDT) Received: by mail-pa0-f71.google.com with SMTP id vp2so113457008pab.3 for ; Thu, 08 Sep 2016 10:22:02 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTPS id f8si47619596pfd.211.2016.09.08.10.22.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 08 Sep 2016 10:22:01 -0700 (PDT) From: "Huang\, Ying" Subject: Re: [PATCH -v3 05/10] mm, THP, swap: Add get_huge_swap_page() References: <1473266769-2155-1-git-send-email-ying.huang@intel.com> <1473266769-2155-6-git-send-email-ying.huang@intel.com> <20160908111353.GD17331@node> Date: Thu, 08 Sep 2016 10:22:01 -0700 In-Reply-To: <20160908111353.GD17331@node> (Kirill A. Shutemov's message of "Thu, 8 Sep 2016 14:13:53 +0300") Message-ID: <87d1ketih2.fsf@yhuang-mobile.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Sender: owner-linux-mm@kvack.org List-ID: To: "Kirill A. Shutemov" Cc: "Huang, Ying" , Andrew Morton , tim.c.chen@intel.com, dave.hansen@intel.com, andi.kleen@intel.com, aaron.lu@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrea Arcangeli , "Kirill A . Shutemov" , Hugh Dickins , Shaohua Li , Minchan Kim , Rik van Riel "Kirill A. Shutemov" writes: > On Wed, Sep 07, 2016 at 09:46:04AM -0700, Huang, Ying wrote: >> From: Huang Ying >> >> A variation of get_swap_page(), get_huge_swap_page(), is added to >> allocate a swap cluster (512 swap slots) based on the swap cluster >> allocation function. A fair simple algorithm is used, that is, only the >> first swap device in priority list will be tried to allocate the swap >> cluster. The function will fail if the trying is not successful, and >> the caller will fallback to allocate a single swap slot instead. This >> works good enough for normal cases. > > For normal cases, yes. But the limitation is not obvious for users and > performance difference after small change in configuration could be > puzzling. If the difference of the number of the free swap clusters among multiple swap devices is significant, it is possible that some THP are split earlier than necessary because we fail to allocate the swap clusters for them. For example, this could be caused by big size difference among multiple swap devices. > At least this must be documented somewhere. I can add the above description in the patch description. Any other places do you suggest? Best Regards, Huang, Ying [snip] -- 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