From: Holger Kiehl <Holger.Kiehl@dwd.de>
To: Shaohua Li <shli@kernel.org>
Cc: linux-mm@kvack.org, akpm@linux-foundation.org
Subject: Re: [RFC]swap: don't do discard if no discard option added
Date: Tue, 20 Mar 2012 18:21:29 +0000 (GMT) [thread overview]
Message-ID: <alpine.LRH.2.02.1203201812260.18801@diagnostix.dwd.de> (raw)
In-Reply-To: <4F68795E.9030304@kernel.org>
Hello,
just tested this patch and this solves my problem where I have very
long boot times and even some timeout problems.
Regards,
Holger
On Tue, 20 Mar 2012, Shaohua Li wrote:
>
> Even don't add discard option, swapon will do discard, this sounds buggy,
> especially when discard is slow or buggy.
>
> Reported-by: Holger Kiehl <Holger.Kiehl@dwd.de>
> Signed-off-by: Shaohua Li <shli@fusionio.com>
> ---
> mm/swapfile.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux/mm/swapfile.c
> ===================================================================
> --- linux.orig/mm/swapfile.c 2012-03-20 20:11:59.222767526 +0800
> +++ linux/mm/swapfile.c 2012-03-20 20:13:25.362767387 +0800
> @@ -2105,7 +2105,7 @@ SYSCALL_DEFINE2(swapon, const char __use
> p->flags |= SWP_SOLIDSTATE;
> p->cluster_next = 1 + (random32() % p->highest_bit);
> }
> - if (discard_swap(p) == 0 && (swap_flags & SWAP_FLAG_DISCARD))
> + if ((swap_flags & SWAP_FLAG_DISCARD) && discard_swap(p) == 0)
> p->flags |= SWP_DISCARDABLE;
> }
>
>
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-03-20 18:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 12:34 Shaohua Li
2012-03-20 18:21 ` Holger Kiehl [this message]
2012-03-20 19:42 ` Andrew Morton
2012-03-21 3:57 ` Hugh Dickins
2012-03-21 4:31 ` Shaohua Li
2012-03-21 4:56 ` Andrew Morton
2012-03-23 11:23 ` Hugh Dickins
2012-03-23 11:00 ` Hugh Dickins
2012-03-21 17:55 ` Holger Kiehl
2012-03-23 11:38 ` Hugh Dickins
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=alpine.LRH.2.02.1203201812260.18801@diagnostix.dwd.de \
--to=holger.kiehl@dwd.de \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=shli@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox