linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>,
	Andrew Morton <akpm@linux-foundation.org>,
	Arthur Marsh <arthur.marsh@internode.on.net>,
	Clemens Ladisch <cladisch@googlemail.com>,
	Linux-MM <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] mm: compaction: Minimise the time IRQs are disabled while isolating pages for migration
Date: Sat, 26 Feb 2011 01:16:11 +0100	[thread overview]
Message-ID: <20110226001611.GA19630@random.random> (raw)
In-Reply-To: <20110225223204.GW25382@cmpxchg.org>

On Fri, Feb 25, 2011 at 11:32:04PM +0100, Johannes Weiner wrote:
> I don't understand why this conditional is broken up like this.
> cond_resched() will have the right checks anyway.  Okay, you would
> save fatal_signal_pending() in the 'did one cluster' case.  Is it that
> expensive?  Couldn't this be simpler like
> 
> 		did_cluster = ((low_pfn + 1) % SWAP_CLUSTER_MAX) == 0
> 		lock_contended = spin_is_contended(&zone->lru_lock);
> 		if (did_cluster || lock_contended || need_resched()) {
> 			spin_unlock_irq(&zone->lru_lock);
> 			cond_resched();
> 			spin_lock_irq(&zone->lru_lock);
> 			if (fatal_signal_pending(current))
> 				break;
> 		}
> 
> instead?

If we don't release irqs first, how can need_resched get set in the
first place if the local apic irq can't run? I guess that's why
there's no cond_resched_lock_irq. BTW, I never liked too much clearing
interrupts for locks that can't ever be taken from irq (it's a
scalability boost to reduce contention but it makes things like above
confusing and it increases irq latency a bit.

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

  reply	other threads:[~2011-02-26  0:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25 20:04 [PATCH 0/2] Reduce the amount of time compaction disables IRQs for V2 Mel Gorman
2011-02-25 20:04 ` [PATCH 1/2] mm: compaction: Minimise the time IRQs are disabled while isolating free pages Mel Gorman
2011-02-25 22:34   ` Johannes Weiner
2011-02-28  1:55   ` KAMEZAWA Hiroyuki
2011-02-28 22:08   ` Minchan Kim
2011-02-25 20:04 ` [PATCH 2/2] mm: compaction: Minimise the time IRQs are disabled while isolating pages for migration Mel Gorman
2011-02-25 22:32   ` Johannes Weiner
2011-02-26  0:16     ` Andrea Arcangeli [this message]
2011-02-28  2:17   ` KAMEZAWA Hiroyuki
2011-02-28  5:48     ` Andrea Arcangeli
2011-02-28  5:54       ` KAMEZAWA Hiroyuki
2011-02-28  9:28         ` Mel Gorman
2011-02-28  9:42           ` KAMEZAWA Hiroyuki
2011-02-28 10:18             ` Mel Gorman
2011-02-28 23:42               ` KAMEZAWA Hiroyuki
2011-03-01  4:11                 ` Minchan Kim
2011-03-01  4:49                   ` KAMEZAWA Hiroyuki
2011-02-28 23:01   ` Minchan Kim
2011-02-28 23:07     ` Andrea Arcangeli
2011-02-28 23:25       ` Minchan Kim
2011-03-01 22:15   ` Andrew Morton
2011-02-25 20:07 ` [PATCH 0/2] Reduce the amount of time compaction disables IRQs for V2 Andrea Arcangeli
  -- strict thread matches above, loose matches on Subject: below --
2011-03-01 15:35 [PATCH 2/2] mm: compaction: Minimise the time IRQs are disabled while isolating pages for migration Minchan Kim
2011-03-01 16:19 ` Andrea Arcangeli
2011-03-01 22:22   ` Minchan Kim
2011-03-01 22:34     ` Andrew Morton
2011-03-01 22:57       ` Minchan Kim
2011-02-25 18:00 [PATCH 0/2] Reduce the amount of time compaction disables IRQs for Mel Gorman
2011-02-25 18:00 ` [PATCH 2/2] mm: compaction: Minimise the time IRQs are disabled while isolating pages for migration Mel Gorman

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=20110226001611.GA19630@random.random \
    --to=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arthur.marsh@internode.on.net \
    --cc=cladisch@googlemail.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mel@csn.ul.ie \
    /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;
as well as URLs for NNTP newsgroup(s).