All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <shijie8@gmail.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Minchan Kim <minchan.kim@gmail.com>,
	akpm@linux-foundation.org, mel@csn.ul.ie, linux-mm@kvack.org
Subject: Re: [PATCH] page allocator: fix update NR_FREE_PAGES only as necessary
Date: Mon, 04 Jan 2010 17:35:15 +0800	[thread overview]
Message-ID: <4B41B653.2060204@gmail.com> (raw)
In-Reply-To: <20100104151444.96A8.A69D9226@jp.fujitsu.com>

>
>> struct per_cpu_pageset {
>>    .................................................
>> #ifdef CONFIG_SMP
>>       s8 stat_threshold;
>>       s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS];
>> #endif
>> } ____cacheline_aligned_in_smp;
>>
>> The field 'stat_threshold' is in the CONFIG_SMP macro, does it not need
>> the spinlock? I will read the code more carefully.
>> I saw the macro, so I thought it need the spinlock. :)
>>      
> Generally,  per-cpu data isn't accessed from another cpu. it only need to care
> process-context vs irq-context race.
>
>
>    
If the  __mod_zone_page_state() can be used without caring about the 
spinlock, I think there
are several places we can move __mod_zone_page_state() out the guard 
area of spinlock to
release the pressure of the zone->lock,such as in rmqueue_bulk().





--
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>

  reply	other threads:[~2010-01-04  9:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04  2:22 [PATCH] mm : add check for the return value Huang Shijie
2010-01-04  3:21 ` Minchan Kim
2010-01-04  4:10   ` shijie8
2010-01-04  4:48     ` Minchan Kim
2010-01-04  5:18       ` Huang Shijie
2010-01-04  6:06         ` Minchan Kim
2010-01-08 22:59           ` Andrew Morton
2010-01-04  5:52   ` [PATCH] page allocator: fix update NR_FREE_PAGES only as necessary KOSAKI Motohiro
2010-01-04  6:03     ` Minchan Kim
2010-01-04  6:11     ` Huang Shijie
2010-01-04  6:16       ` KOSAKI Motohiro
2010-01-04  9:35         ` Huang Shijie [this message]
2010-01-05  7:24           ` KOSAKI Motohiro
2010-01-04  9:58     ` Mel Gorman
2010-01-04 17:46       ` Christoph Lameter
2010-01-05  1:08       ` KOSAKI Motohiro
2010-01-08 23:02     ` Andrew Morton

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=4B41B653.2060204@gmail.com \
    --to=shijie8@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    --cc=minchan.kim@gmail.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.