ALT Linux kernel packages development
 help / color / mirror / Atom feed
From: Alex Yustasov <snmon@server.by>
To: devel-kernel@altlinux.ru, lakostis@altlinux.ru
Subject: [d-kernel] Про wks26
Date: Thu, 27 Jan 2005 16:47:52 +0200
Message-ID: <20050127144752.GA7697@server.by> (raw)

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

Здравствуйте.
У меня wks26 падало при resume. Виноват был
2.6_98_sched-fix-scheduling-latencies-in-mttrc.patch
из lowlatency.
Я его поменял немножно. Вместо spin_lock_irq и spin_unclock_irq
поставил spin_lock_irqsave и spin_unlock_irqrestore. (в аттаче)
С ним работает.
Заливать в cvs?

[-- Attachment #2: 2.6_98_sched-fix-scheduling-latencies-in-mttrc.patch --]
[-- Type: text/plain, Size: 1631 bytes --]

diff -puN arch/i386/kernel/cpu/mtrr/generic.c~sched-fix-scheduling-latencies-in-mttrc arch/i386/kernel/cpu/mtrr/generic.c
--- 25/arch/i386/kernel/cpu/mtrr/generic.c~sched-fix-scheduling-latencies-in-mttrc	Tue Sep 14 17:42:08 2004
+++ 25-akpm/arch/i386/kernel/cpu/mtrr/generic.c	Tue Sep 14 17:42:08 2004
@@ -240,11 +240,9 @@
 	/*  Note that this is not ideal, since the cache is only flushed/disabled
 	   for this CPU while the MTRRs are changed, but changing this requires
 	   more invasive changes to the way the kernel boots  */
-	spin_lock(&set_atomicity_lock);
 
 	/*  Enter the no-fill (CD=1, NW=0) cache mode and flush caches. */
 	cr0 = read_cr0() | 0x40000000;	/* set CD flag */
-	wbinvd();
 	write_cr0(cr0);
 	wbinvd();
 
@@ -266,8 +264,7 @@
 
 static void post_set(void)
 {
-	/*  Flush caches and TLBs  */
-	wbinvd();
+	/*  Flush TLBs (no need to flush caches - they are disabled)  */
 	__flush_tlb();
 
 	/* Intel (P6) standard MTRRs */
@@ -279,12 +276,17 @@
 	/*  Restore value of CR4  */
 	if ( cpu_has_pge )
 		write_cr4(cr4);
-	spin_unlock(&set_atomicity_lock);
 }
 
 static void generic_set_all(void)
 {
-	unsigned long mask, count;
+	unsigned long mask, count, flags;
+
+	/*
+	 * Since we are disabling the cache dont allow any interrupts - they
+	 * would run extremely slow and would only increase the pain:
+	 */
+	spin_lock_irqsave(&set_atomicity_lock, flags);
 
 	prepare_set();
 
@@ -293,6 +295,8 @@
 
 	post_set();
 
+	spin_unlock_irqrestore(&set_atomicity_lock, flags);
+
 	/*  Use the atomic bitops to update the global mask  */
 	for (count = 0; count < sizeof mask * 8; ++count) {
 		if (mask & 0x01)

                 reply	other threads:[~2005-01-27 14:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050127144752.GA7697@server.by \
    --to=snmon@server.by \
    --cc=devel-kernel@altlinux.ru \
    --cc=lakostis@altlinux.ru \
    /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

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git