Skip to contentSkip to conversation

mm/writeback: remove wb_reason_name

PATCH Superseded Wanpeng Li 2 participants 11 messages Jun 18, 2013

Subsystems (6)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Wanpeng Li

author
#0 lore raw

PATCH v3 1/6 mm/writeback: remove wb_reason_name

wb_reason_name is not used any more, this patch remove it.

---
 include/linux/writeback.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
include/linux/writeback.h +0 -1
index e27468e..8b5cec4 100644
@@ -51,7 +51,6 @@ enum wb_reason {
 
 	WB_REASON_MAX,
 };
-extern const char *wb_reason_name[];
 
 /*
  * A control structure which tells the writeback code what to do.  These are
Signature · 7 lines
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#1 lore raw

PATCH v3 2/6 mm/writeback: Don't check force_wait to handle bdi->work_list

After commit 839a8e86("writeback: replace custom worker pool implementation with unbound workqueue"), bdi_writeback_workfn runs off bdi_writeback->dwork, on each execution, it processes bdi->work_list and reschedules if there are more things to do instead of flush any work that race with us existing. It is unecessary to check force_wait in wb_do_writeback since it is always 0 after the mentioned commit. This patch remove the force_wait in wb_do_writeback.

---
 fs/fs-writeback.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
fs/fs-writeback.c +2 -8
index f892dec..e15aa97 100644
@@ -959,7 +959,7 @@ static long wb_check_old_data_flush(struct bdi_writeback *wb)
 /*
  * Retrieve work items and do the writeback they describe
  */
-static long wb_do_writeback(struct bdi_writeback *wb, int force_wait)
+static long wb_do_writeback(struct bdi_writeback *wb)
 {
 	struct backing_dev_info *bdi = wb->bdi;
 	struct wb_writeback_work *work;
@@ -967,12 +967,6 @@ static long wb_do_writeback(struct bdi_writeback *wb, int force_wait)
 
 	set_bit(BDI_writeback_running, &wb->bdi->state);
 	while ((work = get_next_work_item(bdi)) != NULL) {
-		/*
-		 * Override sync mode, in case we must wait for completion
-		 * because this thread is exiting now.
-		 */
-		if (force_wait)
-			work->sync_mode = WB_SYNC_ALL;
 
 		trace_writeback_exec(bdi, work);
 
@@ -1021,7 +1015,7 @@ void bdi_writeback_workfn(struct work_struct *work)
 		 * rescuer as work_list needs to be drained.
 		 */
 		do {
-			pages_written = wb_do_writeback(wb, 0);
+			pages_written = wb_do_writeback(wb);
 			trace_writeback_pages_written(pages_written);
 		} while (!list_empty(&bdi->work_list));
 	} else {
Signature · 7 lines
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by on v3 2/6
#2 lore raw

Re: [PATCH v3 2/6] mm/writeback: Don't check force_wait to handle bdi->work_list

Quoted 8 lines · Wanpeng Li

After commit 839a8e86("writeback: replace custom worker pool implementation with unbound workqueue"), bdi_writeback_workfn runs off bdi_writeback->dwork, on each execution, it processes bdi->work_list and reschedules if there are more things to do instead of flush any work that race with us existing. It is unecessary to check force_wait in wb_do_writeback since it is always 0 after the mentioned commit. This patch remove the force_wait in wb_do_writeback.

Thanks.

Signature · 7 lines
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#3 lore raw

PATCH v3 3/6 mm/writeback: commit reason of WB_REASON_FORKER_THREAD mismatch name

In reply to Wanpeng Li

After commit 839a8e86("writeback: replace custom worker pool implementation with unbound workqueue"), there is no bdi forker thread any more. However, WB_REASON_FORKER_THREAD is still used due to it is somewhat userland visible and we won't be exposing exactly the same information with just a different name.

---
 include/linux/writeback.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/writeback.h +5 -0
index 8b5cec4..ac73a9d 100644
@@ -47,6 +47,11 @@ enum wb_reason {
 	WB_REASON_LAPTOP_TIMER,
 	WB_REASON_FREE_MORE_MEM,
 	WB_REASON_FS_FREE_SPACE,
+/*
+ * There is no bdi forker thread any more and works are done by emergency
+ * worker, however, this is somewhat userland visible and we'll be exposing
+ * exactly the same information, so it has a mismatch name.
+ */
 	WB_REASON_FORKER_THREAD,
 
 	WB_REASON_MAX,
Signature · 7 lines
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by on v3 3/6
#4 lore raw

Re: [PATCH v3 3/6] mm/writeback: commit reason of WB_REASON_FORKER_THREAD mismatch name

Quoted 7 lines · Wanpeng Li

After commit 839a8e86("writeback: replace custom worker pool implementation with unbound workqueue"), there is no bdi forker thread any more. However, WB_REASON_FORKER_THREAD is still used due to it is somewhat userland visible and we won't be exposing exactly the same information with just a different name.

include/linux/writeback.h enum wb_reason { · line 55

Quoted 6 lines
include/linux/writeback.h +5 -0
+/*
+ * There is no bdi forker thread any more and works are done by emergency
+ * worker, however, this is somewhat userland visible and we'll be exposing
+ * exactly the same information, so it has a mismatch name.
+ */
 	WB_REASON_FORKER_THREAD,

But it'd be probably better to explicitly point to the TPs rather than saying "somewhat" visible.

Thanks.

Signature · 7 lines
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#5 lore raw

Re: [PATCH v3 3/6] mm/writeback: commit reason of WB_REASON_FORKER_THREAD mismatch name

Quoted 18 lines · Tejun Heo
Quoted 7 lines · Wanpeng Li

After commit 839a8e86("writeback: replace custom worker pool implementation with unbound workqueue"), there is no bdi forker thread any more. However, WB_REASON_FORKER_THREAD is still used due to it is somewhat userland visible and we won't be exposing exactly the same information with just a different name.

include/linux/writeback.h enum wb_reason { · line 55

Quoted 6 lines
include/linux/writeback.h +5 -0
+/*
+ * There is no bdi forker thread any more and works are done by emergency
+ * worker, however, this is somewhat userland visible and we'll be exposing
+ * exactly the same information, so it has a mismatch name.
+ */
 	WB_REASON_FORKER_THREAD,
Quoted 2 lines

But it'd be probably better to explicitly point to the TPs rather than saying "somewhat" visible.

Thanks for your review, Tejun, I will update them in next version. ;-)

Regards,
Wanpeng Li

Quoted 5 lines

Thanks.

Signature · 1 line
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#6 lore raw

Re: [PATCH v3 3/6] mm/writeback: commit reason of WB_REASON_FORKER_THREAD mismatch name

In reply to Tejun Heo
Quoted 18 lines · Tejun Heo
Quoted 7 lines · Wanpeng Li

After commit 839a8e86("writeback: replace custom worker pool implementation with unbound workqueue"), there is no bdi forker thread any more. However, WB_REASON_FORKER_THREAD is still used due to it is somewhat userland visible and we won't be exposing exactly the same information with just a different name.

include/linux/writeback.h enum wb_reason { · line 55

Quoted 6 lines
include/linux/writeback.h +5 -0
+/*
+ * There is no bdi forker thread any more and works are done by emergency
+ * worker, however, this is somewhat userland visible and we'll be exposing
+ * exactly the same information, so it has a mismatch name.
+ */
 	WB_REASON_FORKER_THREAD,
Quoted 2 lines

But it'd be probably better to explicitly point to the TPs rather than saying "somewhat" visible.

Thanks for your review, Tejun, I will update them in next version. ;-)

Regards,
Wanpeng Li

Quoted 5 lines

Thanks.

Signature · 1 line
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#7 lore raw

PATCH v3 4/6 mm/page_alloc: fix doc for numa_zonelist_order

In reply to Wanpeng Li

Changelog:
v2 - > v3:
* add Michal's Reviewed-by

The default zonelist order selecter will select "node" order if any node's DMA zone comprises greater than 70% of its local memory instead of 60%, according to default_zonelist_order::low_kmem_size > total * 70/100.

---
 Documentation/sysctl/vm.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Documentation/sysctl/vm.txt +1 -1
index a5717c3..15d341a 100644
@@ -531,7 +531,7 @@ Specify "[Dd]efault" to request automatic configuration.  Autoconfiguration
 will select "node" order in following case.
 (1) if the DMA zone does not exist or
 (2) if the DMA zone comprises greater than 50% of the available memory or
-(3) if any node's DMA zone comprises greater than 60% of its local memory and
+(3) if any node's DMA zone comprises greater than 70% of its local memory and
     the amount of local memory is big enough.
 
 Otherwise, "zone" order will be selected. Default order is recommended unless
Signature · 7 lines
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#8 lore raw

PATCH v3 5/6 mm/thp: fix doc for transparent huge zero page

In reply to Wanpeng Li

Changelog:
v1 - > v2:
* add Kirill's Acked

Transparent huge zero page is used during the page fault instead of in khugepaged.

# ls /sys/kernel/mm/transparent_hugepage/
defrag  enabled  khugepaged  use_zero_page
# ls /sys/kernel/mm/transparent_hugepage/khugepaged/
alloc_sleep_millisecs  defrag  full_scans  max_ptes_none  pages_collapsed  pages_to_scan  scan_sleep_millisecs

This patch corrects the documentation just like the codes done.

---
 Documentation/vm/transhuge.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/vm/transhuge.txt +2 -2
index 8785fb8..4a63953 100644
@@ -120,8 +120,8 @@ By default kernel tries to use huge zero page on read page fault.
 It's possible to disable huge zero page by writing 0 or enable it
 back by writing 1:
 
-echo 0 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
-echo 1 >/sys/kernel/mm/transparent_hugepage/khugepaged/use_zero_page
+echo 0 >/sys/kernel/mm/transparent_hugepage/use_zero_page
+echo 1 >/sys/kernel/mm/transparent_hugepage/use_zero_page
 
 khugepaged will be automatically started when
 transparent_hugepage/enabled is set to "always" or "madvise, and it'll
Signature · 7 lines
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
author
#9 lore raw

PATCH v3 6/6 mm/pgtable: Don't accumulate addr during pgd prepopulate pmd

In reply to Wanpeng Li

Changelog:
v2 - > v3:
* add Michal's Reviewed-by

The old codes accumulate addr to get right pmd, however, currently pmds are preallocated and transfered as a parameter, there is unnecessary to accumulate addr variable any more, this patch remove it.

---
 arch/x86/mm/pgtable.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
arch/x86/mm/pgtable.c +1 -3
index 17fda6a..dfa537a 100644
@@ -240,7 +240,6 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp)
 static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
 {
 	pud_t *pud;
-	unsigned long addr;
 	int i;
 
 	if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */
@@ -248,8 +247,7 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[])
 
 	pud = pud_offset(pgd, 0);
 
- 	for (addr = i = 0; i < PREALLOCATED_PMDS;
-	     i++, pud++, addr += PUD_SIZE) {
+	for (i = 0; i < PREALLOCATED_PMDS; i++, pud++) {
 		pmd_t *pmd = pmds[i];
 
 		if (i >= KERNEL_PGD_BOUNDARY)
Signature · 7 lines
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Reviewed-by on v3 1/6
#10 lore raw
In reply to Wanpeng Li
Quoted 3 lines · Wanpeng Li

wb_reason_name is not used any more, this patch remove it.

Thanks.

Signature · 7 lines
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>