linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Arun KS <arunks@codeaurora.org>
Cc: arunks.linux@gmail.com, akpm@linux-foundation.org,
	vbabka@suse.cz, osalvador@suse.de, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, getarunks@gmail.com
Subject: Re: [PATCH v6 2/2] mm/page_alloc: remove software prefetching in __free_pages_core
Date: Tue, 6 Nov 2018 15:08:01 +0100	[thread overview]
Message-ID: <20181106140801.GO27423@dhcp22.suse.cz> (raw)
In-Reply-To: <1541484194-1493-2-git-send-email-arunks@codeaurora.org>

On Tue 06-11-18 11:33:14, Arun KS wrote:
> They not only increase the code footprint, they actually make things
> slower rather than faster. Remove them as contemporary hardware doesn't
> need any hint.

I guess I have already asked for that. When you argue about performance
then always add some numbers.

I do agree we want to get rid of the prefetching because it is just too
of an micro-optimization without any reasonable story behind.

> Suggested-by: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Arun KS <arunks@codeaurora.org>
> ---
>  mm/page_alloc.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 7cf503f..a1b9a6a 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -1270,14 +1270,10 @@ void __free_pages_core(struct page *page, unsigned int order)
>  	struct page *p = page;
>  	unsigned int loop;
>  
> -	prefetchw(p);
> -	for (loop = 0; loop < (nr_pages - 1); loop++, p++) {
> -		prefetchw(p + 1);
> +	for (loop = 0; loop < nr_pages ; loop++, p++) {
>  		__ClearPageReserved(p);
>  		set_page_count(p, 0);
>  	}
> -	__ClearPageReserved(p);
> -	set_page_count(p, 0);
>  
>  	page_zone(page)->managed_pages += nr_pages;
>  	set_page_refcounted(page);
> -- 
> 1.9.1

-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-11-06 14:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06  6:03 [PATCH v6 1/2] memory_hotplug: Free pages as higher order Arun KS
2018-11-06  6:03 ` [PATCH v6 2/2] mm/page_alloc: remove software prefetching in __free_pages_core Arun KS
2018-11-06 14:08   ` Michal Hocko [this message]
2018-11-06 14:06 ` [PATCH v6 1/2] memory_hotplug: Free pages as higher order Michal Hocko
2018-11-06 15:31   ` Arun KS
2018-11-06 20:08     ` Michal Hocko
2018-11-07  6:21       ` Arun KS
2019-01-04  5:05         ` Arun KS
2019-01-04  8:58           ` Michal Hocko
2019-01-04  9:01             ` Arun Sudhilal
2019-01-04  9:01               ` Arun Sudhilal

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=20181106140801.GO27423@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=arunks.linux@gmail.com \
    --cc=arunks@codeaurora.org \
    --cc=getarunks@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=vbabka@suse.cz \
    /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