diff for duplicates of <20080825201534.23217.14936.stgit@dev.haskins.net> diff --git a/a/1.txt b/N1/1.txt index d23c505..99ce84d 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -24,3 +24,27 @@ index 6e0bde6..b7326cd 100644 __acquires(this_rq->lock) { - int ret = 0; +- + if (unlikely(!irqs_disabled())) { + /* printk() doesn't work good under rq->lock */ + spin_unlock(&this_rq->lock); + BUG_ON(1); + } +- if (unlikely(!spin_trylock(&busiest->lock))) { +- if (busiest < this_rq) { +- spin_unlock(&this_rq->lock); +- spin_lock(&busiest->lock); +- spin_lock_nested(&this_rq->lock, SINGLE_DEPTH_NESTING); +- ret = 1; +- } else +- spin_lock_nested(&busiest->lock, SINGLE_DEPTH_NESTING); +- } +- return ret; ++ ++ spin_unlock(&this_rq->lock); ++ double_rq_lock(this_rq, busiest); ++ ++ return 1; + } + + static void double_unlock_balance(struct rq *this_rq, struct rq *busiest) diff --git a/a/content_digest b/N1/content_digest index d10fef4..05b8c84 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -36,6 +36,30 @@ " \t__acquires(busiest->lock)\n" " \t__acquires(this_rq->lock)\n" " {\n" - "-\tint ret = 0;" + "-\tint ret = 0;\n" + "-\n" + " \tif (unlikely(!irqs_disabled())) {\n" + " \t\t/* printk() doesn't work good under rq->lock */\n" + " \t\tspin_unlock(&this_rq->lock);\n" + " \t\tBUG_ON(1);\n" + " \t}\n" + "-\tif (unlikely(!spin_trylock(&busiest->lock))) {\n" + "-\t\tif (busiest < this_rq) {\n" + "-\t\t\tspin_unlock(&this_rq->lock);\n" + "-\t\t\tspin_lock(&busiest->lock);\n" + "-\t\t\tspin_lock_nested(&this_rq->lock, SINGLE_DEPTH_NESTING);\n" + "-\t\t\tret = 1;\n" + "-\t\t} else\n" + "-\t\t\tspin_lock_nested(&busiest->lock, SINGLE_DEPTH_NESTING);\n" + "-\t}\n" + "-\treturn ret;\n" + "+\n" + "+\tspin_unlock(&this_rq->lock);\n" + "+\tdouble_rq_lock(this_rq, busiest);\n" + "+\n" + "+\treturn 1;\n" + " }\n" + " \n" + static void double_unlock_balance(struct rq *this_rq, struct rq *busiest) -5c92c249e51b56da8c135ad947012f9032a772ff205edb9ce58bcdc7aa042853 +4ffb3b04163a147d39ab2c489385dbce517b9af6855485fd494c96c31583b472
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.