lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200611232024.15179.m.kozlowski@tuxland.pl>
Date:	Thu, 23 Nov 2006 20:24:14 +0100
From:	Mariusz Kozlowski <m.kozlowski@...land.pl>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: 2.6.19-rc6-mm1

Hello, 

> > 	Hmmm ... didn't apply cleanly.
> > 
> > patching file kernel/tsacct.c
> > Hunk #1 FAILED at 97.
> > 1 out of 1 hunk FAILED -- saving rejects to file kernel/tsacct.c.rej
> 
> I think your local tree is not clean.

Nope. I've seen it on three boxes.
 
> > Anyway this is what I get on my laptop:
> > 
> > =================================
> > [ INFO: inconsistent lock state ]
> > 2.6.19-rc6-mm1 #1
> > ---------------------------------
> > inconsistent {hardirq-on-R} -> {in-hardirq-W} usage.
> 
> hm, nested read_lock_irq()+read_unlock_irq() in the readahead code..

I guess what you meant was sth like the patch below. That helped. Thanks.

--- linux-2.6.19-rc6-mm1-a/mm/readahead.c	2006-11-23 20:03:53.000000000 +0100
+++ linux-2.6.19-rc6-mm1-b/mm/readahead.c	2006-11-23 19:57:26.000000000 +0100
@@ -1227,10 +1227,10 @@ static inline unsigned long inactive_pag

 /*
  * Count/estimate cache hits in range [begin, end).
- * The estimation is simple and optimistic.
+ * The estimation is simple and optimistic. The caller must hold tree_lock.
  */
 #define CACHE_HIT_HASH_KEY	29	/* some prime number */
-static int count_cache_hit(struct address_space *mapping,
+static int __count_cache_hit(struct address_space *mapping,
 						pgoff_t begin, pgoff_t end)
 {
 	int size = end - begin;
@@ -1243,14 +1243,12 @@ static int count_cache_hit(struct addres
 	 * behavior guarantees a readahead when (size < ra_max) and
 	 * (readahead_hit_rate >= 8).
 	 */
-	read_lock_irq(&mapping->tree_lock);
 	for (i = 0; i < 8;) {
 		struct page *page = radix_tree_lookup(&mapping->page_tree,
 			begin + size * ((i++ * CACHE_HIT_HASH_KEY) & 7) / 8);
 		if (inactive_page_refcnt(page) >= PAGE_REFCNT_1 && ++count >= 2)
 			break;
 	}
-	read_unlock_irq(&mapping->tree_lock);

 	return size * count / i;
 }
@@ -1282,7 +1280,7 @@ static unsigned long count_history_pages
 	 */
 	if (!(ra->flags & RA_FLAG_NFSD)) {
 		unsigned long hit_rate = max(readahead_hit_rate, 1);
-		if (count_cache_hit(mapping, head, offset) * hit_rate < count)
+		if (__count_cache_hit(mapping, head, offset) * hit_rate < count)
 			count = 0;
 	}



-- 
Regards,

	Mariusz Kozlowski
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ