Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
Revert "mm: add /proc controls for pdflush threads"
viocd: needs to depend on BLOCK
block: fix the bio_vec array index out-of-bounds test

+15 -74
-28
Documentation/sysctl/vm.txt
··· 39 39 - nr_hugepages 40 40 - nr_overcommit_hugepages 41 41 - nr_pdflush_threads 42 - - nr_pdflush_threads_min 43 - - nr_pdflush_threads_max 44 42 - nr_trim_pages (only if CONFIG_MMU=n) 45 43 - numa_zonelist_order 46 44 - oom_dump_tasks ··· 464 466 is used in oom_kill_allocating_task. 465 467 466 468 The default value is 0. 467 - 468 - ============================================================== 469 - 470 - nr_pdflush_threads_min 471 - 472 - This value controls the minimum number of pdflush threads. 473 - 474 - At boot time, the kernel will create and maintain 'nr_pdflush_threads_min' 475 - threads for the kernel's lifetime. 476 - 477 - The default value is 2. The minimum value you can specify is 1, and 478 - the maximum value is the current setting of 'nr_pdflush_threads_max'. 479 - 480 - See 'nr_pdflush_threads_max' below for more information. 481 - 482 - ============================================================== 483 - 484 - nr_pdflush_threads_max 485 - 486 - This value controls the maximum number of pdflush threads that can be 487 - created. The pdflush algorithm will create a new pdflush thread (up to 488 - this maximum) if no pdflush threads have been available for >= 1 second. 489 - 490 - The default value is 8. The minimum value you can specify is the 491 - current value of 'nr_pdflush_threads_min' and the 492 - maximum is 1000. 493 469 494 470 ============================================================== 495 471
+1
arch/powerpc/platforms/iseries/Kconfig
··· 17 17 18 18 config VIOCD 19 19 tristate "iSeries Virtual I/O CD support" 20 + depends on BLOCK 20 21 select VIOPATH 21 22 help 22 23 If you are running Linux on an IBM iSeries system and you want to
+2 -2
block/blk-core.c
··· 1768 1768 } else { 1769 1769 int idx = bio->bi_idx + next_idx; 1770 1770 1771 - if (unlikely(bio->bi_idx >= bio->bi_vcnt)) { 1771 + if (unlikely(idx >= bio->bi_vcnt)) { 1772 1772 blk_dump_rq_flags(req, "__end_that"); 1773 1773 printk(KERN_ERR "%s: bio idx %d >= vcnt %d\n", 1774 - __func__, bio->bi_idx, bio->bi_vcnt); 1774 + __func__, idx, bio->bi_vcnt); 1775 1775 break; 1776 1776 } 1777 1777
-2
include/linux/writeback.h
··· 168 168 /* pdflush.c */ 169 169 extern int nr_pdflush_threads; /* Global so it can be exported to sysctl 170 170 read-only. */ 171 - extern int nr_pdflush_threads_max; /* Global so it can be exported to sysctl */ 172 - extern int nr_pdflush_threads_min; /* Global so it can be exported to sysctl */ 173 171 174 172 175 173 #endif /* WRITEBACK_H */
-23
kernel/sysctl.c
··· 101 101 static int __maybe_unused two = 2; 102 102 static unsigned long one_ul = 1; 103 103 static int one_hundred = 100; 104 - static int one_thousand = 1000; 105 104 106 105 /* this is needed for the proc_doulongvec_minmax of vm_dirty_bytes */ 107 106 static unsigned long dirty_bytes_min = 2 * PAGE_SIZE; ··· 1031 1032 .maxlen = sizeof nr_pdflush_threads, 1032 1033 .mode = 0444 /* read-only*/, 1033 1034 .proc_handler = &proc_dointvec, 1034 - }, 1035 - { 1036 - .ctl_name = CTL_UNNUMBERED, 1037 - .procname = "nr_pdflush_threads_min", 1038 - .data = &nr_pdflush_threads_min, 1039 - .maxlen = sizeof nr_pdflush_threads_min, 1040 - .mode = 0644 /* read-write */, 1041 - .proc_handler = &proc_dointvec_minmax, 1042 - .strategy = &sysctl_intvec, 1043 - .extra1 = &one, 1044 - .extra2 = &nr_pdflush_threads_max, 1045 - }, 1046 - { 1047 - .ctl_name = CTL_UNNUMBERED, 1048 - .procname = "nr_pdflush_threads_max", 1049 - .data = &nr_pdflush_threads_max, 1050 - .maxlen = sizeof nr_pdflush_threads_max, 1051 - .mode = 0644 /* read-write */, 1052 - .proc_handler = &proc_dointvec_minmax, 1053 - .strategy = &sysctl_intvec, 1054 - .extra1 = &nr_pdflush_threads_min, 1055 - .extra2 = &one_thousand, 1056 1035 }, 1057 1036 { 1058 1037 .ctl_name = VM_SWAPPINESS,
+12 -19
mm/pdflush.c
··· 58 58 int nr_pdflush_threads = 0; 59 59 60 60 /* 61 - * The max/min number of pdflush threads. R/W by sysctl at 62 - * /proc/sys/vm/nr_pdflush_threads_max/min 63 - */ 64 - int nr_pdflush_threads_max __read_mostly = MAX_PDFLUSH_THREADS; 65 - int nr_pdflush_threads_min __read_mostly = MIN_PDFLUSH_THREADS; 66 - 67 - 68 - /* 69 61 * The time at which the pdflush thread pool last went empty 70 62 */ 71 63 static unsigned long last_empty_jifs; ··· 68 76 * Thread pool management algorithm: 69 77 * 70 78 * - The minimum and maximum number of pdflush instances are bound 71 - * by nr_pdflush_threads_min and nr_pdflush_threads_max. 79 + * by MIN_PDFLUSH_THREADS and MAX_PDFLUSH_THREADS. 72 80 * 73 81 * - If there have been no idle pdflush instances for 1 second, create 74 82 * a new one. ··· 134 142 * To throttle creation, we reset last_empty_jifs. 135 143 */ 136 144 if (time_after(jiffies, last_empty_jifs + 1 * HZ)) { 137 - if (list_empty(&pdflush_list) && 138 - nr_pdflush_threads < nr_pdflush_threads_max) { 139 - last_empty_jifs = jiffies; 140 - nr_pdflush_threads++; 141 - spin_unlock_irq(&pdflush_lock); 142 - start_one_pdflush_thread(); 143 - spin_lock_irq(&pdflush_lock); 145 + if (list_empty(&pdflush_list)) { 146 + if (nr_pdflush_threads < MAX_PDFLUSH_THREADS) { 147 + last_empty_jifs = jiffies; 148 + nr_pdflush_threads++; 149 + spin_unlock_irq(&pdflush_lock); 150 + start_one_pdflush_thread(); 151 + spin_lock_irq(&pdflush_lock); 152 + } 144 153 } 145 154 } 146 155 ··· 153 160 */ 154 161 if (list_empty(&pdflush_list)) 155 162 continue; 156 - if (nr_pdflush_threads <= nr_pdflush_threads_min) 163 + if (nr_pdflush_threads <= MIN_PDFLUSH_THREADS) 157 164 continue; 158 165 pdf = list_entry(pdflush_list.prev, struct pdflush_work, list); 159 166 if (time_after(jiffies, pdf->when_i_went_to_sleep + 1 * HZ)) { ··· 259 266 * Pre-set nr_pdflush_threads... If we fail to create, 260 267 * the count will be decremented. 261 268 */ 262 - nr_pdflush_threads = nr_pdflush_threads_min; 269 + nr_pdflush_threads = MIN_PDFLUSH_THREADS; 263 270 264 - for (i = 0; i < nr_pdflush_threads_min; i++) 271 + for (i = 0; i < MIN_PDFLUSH_THREADS; i++) 265 272 start_one_pdflush_thread(); 266 273 return 0; 267 274 }