From: Ming Lei <ming.lei@redhat.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Minchan Kim <minchan@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Ming Lei <tom.leiming@gmail.com>, Shaohua Li <shli@fb.com>,
linux-block@vger.kernel.org
Subject: Re: [PATCH -mm 06/13] block: Increase BIO_MAX_PAGES to PMD size if THP_SWAP enabled
Date: Thu, 25 May 2017 16:42:44 +0800 [thread overview]
Message-ID: <20170525084238.GA15737@ming.t460p> (raw)
In-Reply-To: <20170525064635.2832-7-ying.huang@intel.com>
On Thu, May 25, 2017 at 02:46:28PM +0800, Huang, Ying wrote:
> From: Huang Ying <ying.huang@intel.com>
>
> In this patch, BIO_MAX_PAGES is changed from 256 to HPAGE_PMD_NR if
> CONFIG_THP_SWAP is enabled and HPAGE_PMD_NR > 256. This is to support
> THP (Transparent Huge Page) swap optimization. Where the THP will be
> write to disk as a whole instead of HPAGE_PMD_NR normal pages to batch
> the various operations during swap. And the page is likely to be
> written to disk to free memory when system memory goes really low, the
> memory pool need to be used to avoid deadlock.
>
> Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Ming Lei <tom.leiming@gmail.com>
> Cc: Shaohua Li <shli@fb.com>
> Cc: linux-block@vger.kernel.org
> ---
> include/linux/bio.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/bio.h b/include/linux/bio.h
> index d1b04b0e99cf..314796486507 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -38,7 +38,15 @@
> #define BIO_BUG_ON
> #endif
>
> +#ifdef CONFIG_THP_SWAP
> +#if HPAGE_PMD_NR > 256
> +#define BIO_MAX_PAGES HPAGE_PMD_NR
> +#else
> #define BIO_MAX_PAGES 256
> +#endif
> +#else
> +#define BIO_MAX_PAGES 256
> +#endif
>
> #define bio_prio(bio) (bio)->bi_ioprio
> #define bio_set_prio(bio, prio) ((bio)->bi_ioprio = prio)
Last time we discussed we should use multipage bvec for this usage.
I will rebase the last post on v4.12-rc and kick if off again since
the raid cleanup is just done on v4.11.
http://marc.info/?t=148453679000002&r=1&w=2
Thanks,
Ming
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Ming Lei <ming.lei@redhat.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Minchan Kim <minchan@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Ming Lei <tom.leiming@gmail.com>, Shaohua Li <shli@fb.com>,
linux-block@vger.kernel.org
Subject: Re: [PATCH -mm 06/13] block: Increase BIO_MAX_PAGES to PMD size if THP_SWAP enabled
Date: Thu, 25 May 2017 16:42:44 +0800 [thread overview]
Message-ID: <20170525084238.GA15737@ming.t460p> (raw)
In-Reply-To: <20170525064635.2832-7-ying.huang@intel.com>
On Thu, May 25, 2017 at 02:46:28PM +0800, Huang, Ying wrote:
> From: Huang Ying <ying.huang@intel.com>
>
> In this patch, BIO_MAX_PAGES is changed from 256 to HPAGE_PMD_NR if
> CONFIG_THP_SWAP is enabled and HPAGE_PMD_NR > 256. This is to support
> THP (Transparent Huge Page) swap optimization. Where the THP will be
> write to disk as a whole instead of HPAGE_PMD_NR normal pages to batch
> the various operations during swap. And the page is likely to be
> written to disk to free memory when system memory goes really low, the
> memory pool need to be used to avoid deadlock.
>
> Signed-off-by: "Huang, Ying" <ying.huang@intel.com>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Minchan Kim <minchan@kernel.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: Ming Lei <tom.leiming@gmail.com>
> Cc: Shaohua Li <shli@fb.com>
> Cc: linux-block@vger.kernel.org
> ---
> include/linux/bio.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/bio.h b/include/linux/bio.h
> index d1b04b0e99cf..314796486507 100644
> --- a/include/linux/bio.h
> +++ b/include/linux/bio.h
> @@ -38,7 +38,15 @@
> #define BIO_BUG_ON
> #endif
>
> +#ifdef CONFIG_THP_SWAP
> +#if HPAGE_PMD_NR > 256
> +#define BIO_MAX_PAGES HPAGE_PMD_NR
> +#else
> #define BIO_MAX_PAGES 256
> +#endif
> +#else
> +#define BIO_MAX_PAGES 256
> +#endif
>
> #define bio_prio(bio) (bio)->bi_ioprio
> #define bio_set_prio(bio, prio) ((bio)->bi_ioprio = prio)
Last time we discussed we should use multipage bvec for this usage.
I will rebase the last post on v4.12-rc and kick if off again since
the raid cleanup is just done on v4.11.
http://marc.info/?t=148453679000002&r=1&w=2
Thanks,
Ming
next prev parent reply other threads:[~2017-05-25 8:43 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 6:46 [PATCH -mm 00/13] mm, THP, swap: Delay splitting THP after swapped out Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 01/13] mm, THP, swap: Support to clear swap cache flag for THP " Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 02/13] mm, THP, swap: Support to reclaim swap space " Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 03/13] mm, THP, swap: Make reuse_swap_page() works " Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 04/13] mm, THP, swap: Don't allocate huge cluster for file backed swap device Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 05/13] block, THP: Make block_device_operations.rw_page support THP Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-06-02 5:57 ` Ross Zwisler
2017-06-02 5:57 ` Ross Zwisler
2017-06-02 5:57 ` Ross Zwisler
2017-06-05 1:00 ` Huang, Ying
2017-06-05 1:00 ` Huang, Ying
2017-06-05 1:00 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 06/13] block: Increase BIO_MAX_PAGES to PMD size if THP_SWAP enabled Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 8:42 ` Ming Lei [this message]
2017-05-25 8:42 ` Ming Lei
2017-05-26 0:56 ` Huang, Ying
2017-05-26 0:56 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 07/13] mm, THP, swap: Support to write THP to swap device as a whole Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 08/13] mm, THP, swap: Support to split THP for THP swapped out Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 09/13] memcg, THP, swap: Support move mem cgroup charge " Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 10/13] memcg, THP, swap: Avoid to duplicated charge THP in swap cache Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 11/13] memcg, THP, swap: Make mem_cgroup_swapout() support THP Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 12/13] mm, THP, swap: Delay splitting THP after swapped out Huang, Ying
2017-05-25 6:46 ` Huang, Ying
2017-05-25 6:46 ` [PATCH -mm 13/13] mm, THP, swap: Add THP swapping out fallback counting Huang, Ying
2017-05-25 6:46 ` Huang, Ying
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170525084238.GA15737@ming.t460p \
--to=ming.lei@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=hannes@cmpxchg.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=shli@fb.com \
--cc=tom.leiming@gmail.com \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.