* [PATCH] remove no longer use of pdflush interface
@ 2012-06-04 12:40 Wanpeng Li
2012-06-04 12:53 ` Fengguang Wu
0 siblings, 1 reply; 7+ messages in thread
From: Wanpeng Li @ 2012-06-04 12:40 UTC (permalink / raw)
To: Fengguang Wu, Alexander Viro, Jan Kara, Andrew Morton, Mel Gorman,
Minchan Kim, Eric W. Biederman, David Howells, James Morris,
Ingo Molnar
Cc: linux-doc, linux-kernel, linux-fsdevel, Wanpeng Li, Wanpeng Li
From: Wanpeng Li <liwp@linux.vnet.ibm.com>
remove no longer use of pdflush interface nr_pdflush_threads.
Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
---
Documentation/sysctl/vm.txt | 11 -----------
fs/fs-writeback.c | 5 -----
include/linux/writeback.h | 5 -----
kernel/sysctl.c | 7 -------
4 files changed, 28 deletions(-)
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 96f0ee8..71c17d2 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -42,7 +42,6 @@ Currently, these files are in /proc/sys/vm:
- mmap_min_addr
- nr_hugepages
- nr_overcommit_hugepages
-- nr_pdflush_threads
- nr_trim_pages (only if CONFIG_MMU=n)
- numa_zonelist_order
- oom_dump_tasks
@@ -426,16 +425,6 @@ See Documentation/vm/hugetlbpage.txt
==============================================================
-nr_pdflush_threads
-
-The current number of pdflush threads. This value is read-only.
-The value changes according to the number of dirty pages in the system.
-
-When necessary, additional pdflush threads are created, one per second, up to
-nr_pdflush_threads_max.
-
-==============================================================
-
nr_trim_pages
This is available only on NOMMU kernels.
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 539f36c..30ddb8a 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -52,11 +52,6 @@ struct wb_writeback_work {
struct completion *done; /* set if the caller waits */
};
-/*
- * We don't actually have pdflush, but this one is exported though /proc...
- */
-int nr_pdflush_threads;
-
/**
* writeback_in_progress - determine whether there is writeback in progress
* @bdi: the device's backing_dev_info structure.
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index a2b84f5..13b5df7 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -193,9 +193,4 @@ void tag_pages_for_writeback(struct address_space *mapping,
void account_page_redirty(struct page *page);
-/* pdflush.c */
-extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
- read-only. */
-
-
#endif /* WRITEBACK_H */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4ab1187..e257b61 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1095,13 +1095,6 @@ static struct ctl_table vm_table[] = {
.extra1 = &zero,
},
{
- .procname = "nr_pdflush_threads",
- .data = &nr_pdflush_threads,
- .maxlen = sizeof nr_pdflush_threads,
- .mode = 0444 /* read-only*/,
- .proc_handler = proc_dointvec,
- },
- {
.procname = "swappiness",
.data = &vm_swappiness,
.maxlen = sizeof(vm_swappiness),
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] remove no longer use of pdflush interface
2012-06-04 12:40 [PATCH] remove no longer use of pdflush interface Wanpeng Li
@ 2012-06-04 12:53 ` Fengguang Wu
2012-06-04 13:14 ` Minchan Kim
2012-06-04 13:25 ` Wanpeng Li
0 siblings, 2 replies; 7+ messages in thread
From: Fengguang Wu @ 2012-06-04 12:53 UTC (permalink / raw)
To: Wanpeng Li
Cc: Alexander Viro, Jan Kara, Andrew Morton, Mel Gorman, Minchan Kim,
Eric W. Biederman, David Howells, James Morris, Ingo Molnar,
linux-doc, linux-kernel, linux-fsdevel, Wanpeng Li
Hi Wanpeng,
On Mon, Jun 04, 2012 at 08:40:42PM +0800, Wanpeng Li wrote:
> From: Wanpeng Li <liwp@linux.vnet.ibm.com>
>
> remove no longer use of pdflush interface nr_pdflush_threads.
The patch looks good in itself: the nr_pdflush_threads takes no effect
for many of the recent kernels. But what's the normal process of
interface removal? Shall we carry some warning printk for some time
first or whatever?
Thanks,
Fengguang
> Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
> ---
> Documentation/sysctl/vm.txt | 11 -----------
> fs/fs-writeback.c | 5 -----
> include/linux/writeback.h | 5 -----
> kernel/sysctl.c | 7 -------
> 4 files changed, 28 deletions(-)
>
> diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
> index 96f0ee8..71c17d2 100644
> --- a/Documentation/sysctl/vm.txt
> +++ b/Documentation/sysctl/vm.txt
> @@ -42,7 +42,6 @@ Currently, these files are in /proc/sys/vm:
> - mmap_min_addr
> - nr_hugepages
> - nr_overcommit_hugepages
> -- nr_pdflush_threads
> - nr_trim_pages (only if CONFIG_MMU=n)
> - numa_zonelist_order
> - oom_dump_tasks
> @@ -426,16 +425,6 @@ See Documentation/vm/hugetlbpage.txt
>
> ==============================================================
>
> -nr_pdflush_threads
> -
> -The current number of pdflush threads. This value is read-only.
> -The value changes according to the number of dirty pages in the system.
> -
> -When necessary, additional pdflush threads are created, one per second, up to
> -nr_pdflush_threads_max.
> -
> -==============================================================
> -
> nr_trim_pages
>
> This is available only on NOMMU kernels.
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index 539f36c..30ddb8a 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -52,11 +52,6 @@ struct wb_writeback_work {
> struct completion *done; /* set if the caller waits */
> };
>
> -/*
> - * We don't actually have pdflush, but this one is exported though /proc...
> - */
> -int nr_pdflush_threads;
> -
> /**
> * writeback_in_progress - determine whether there is writeback in progress
> * @bdi: the device's backing_dev_info structure.
> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> index a2b84f5..13b5df7 100644
> --- a/include/linux/writeback.h
> +++ b/include/linux/writeback.h
> @@ -193,9 +193,4 @@ void tag_pages_for_writeback(struct address_space *mapping,
>
> void account_page_redirty(struct page *page);
>
> -/* pdflush.c */
> -extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
> - read-only. */
> -
> -
> #endif /* WRITEBACK_H */
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 4ab1187..e257b61 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -1095,13 +1095,6 @@ static struct ctl_table vm_table[] = {
> .extra1 = &zero,
> },
> {
> - .procname = "nr_pdflush_threads",
> - .data = &nr_pdflush_threads,
> - .maxlen = sizeof nr_pdflush_threads,
> - .mode = 0444 /* read-only*/,
> - .proc_handler = proc_dointvec,
> - },
> - {
> .procname = "swappiness",
> .data = &vm_swappiness,
> .maxlen = sizeof(vm_swappiness),
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] remove no longer use of pdflush interface
2012-06-04 12:53 ` Fengguang Wu
@ 2012-06-04 13:14 ` Minchan Kim
2012-06-04 13:25 ` Wanpeng Li
1 sibling, 0 replies; 7+ messages in thread
From: Minchan Kim @ 2012-06-04 13:14 UTC (permalink / raw)
To: Fengguang Wu
Cc: Wanpeng Li, Alexander Viro, Jan Kara, Andrew Morton, Mel Gorman,
Eric W. Biederman, David Howells, James Morris, Ingo Molnar,
linux-doc, linux-kernel, linux-fsdevel, Wanpeng Li
On Mon, Jun 4, 2012 at 9:53 PM, Fengguang Wu <fengguang.wu@intel.com> wrote:
> Hi Wanpeng,
>
> On Mon, Jun 04, 2012 at 08:40:42PM +0800, Wanpeng Li wrote:
>> From: Wanpeng Li <liwp@linux.vnet.ibm.com>
>>
>> remove no longer use of pdflush interface nr_pdflush_threads.
>
> The patch looks good in itself: the nr_pdflush_threads takes no effect
> for many of the recent kernels. But what's the normal process of
> interface removal? Shall we carry some warning printk for some time
> first or whatever?
Yes. you have to add printk warning for noticing it deprecated.
And add descriptoin in Documentation/ABI/obsolete/ and
Documentation/feature-removal-schedule.txt
I don't know how long we maintain it. Is there any rule for it?
Maybe 1-year is suitable, IMHO.
Thanks.
--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] remove no longer use of pdflush interface
2012-06-04 12:53 ` Fengguang Wu
2012-06-04 13:14 ` Minchan Kim
@ 2012-06-04 13:25 ` Wanpeng Li
2012-06-04 13:34 ` Fengguang Wu
1 sibling, 1 reply; 7+ messages in thread
From: Wanpeng Li @ 2012-06-04 13:25 UTC (permalink / raw)
To: Fengguang Wu
Cc: Alexander Viro, Jan Kara, Andrew Morton, Mel Gorman, Minchan Kim,
Eric W. Biederman, David Howells, James Morris, Ingo Molnar,
linux-doc, linux-kernel, linux-fsdevel, Wanpeng Li, Gavin Shan
On Mon, Jun 04, 2012 at 08:53:56PM +0800, Fengguang Wu wrote:
>Hi Wanpeng,
>
>On Mon, Jun 04, 2012 at 08:40:42PM +0800, Wanpeng Li wrote:
>> From: Wanpeng Li <liwp@linux.vnet.ibm.com>
>>
>> remove no longer use of pdflush interface nr_pdflush_threads.
>
>The patch looks good in itself: the nr_pdflush_threads takes no effect
>for many of the recent kernels. But what's the normal process of
>interface removal? Shall we carry some warning printk for some time
>first or whatever?
Hi, Fengguang,
I also want to add an interface of nr_bdi_writeback_threads to statistic
how many flusher-x:y currently running, do you think it is a good idea?
Regards,
Wanpeng Li
>
>
>> Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
>> ---
>> Documentation/sysctl/vm.txt | 11 -----------
>> fs/fs-writeback.c | 5 -----
>> include/linux/writeback.h | 5 -----
>> kernel/sysctl.c | 7 -------
>> 4 files changed, 28 deletions(-)
>>
>> diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
>> index 96f0ee8..71c17d2 100644
>> --- a/Documentation/sysctl/vm.txt
>> +++ b/Documentation/sysctl/vm.txt
>> @@ -42,7 +42,6 @@ Currently, these files are in /proc/sys/vm:
>> - mmap_min_addr
>> - nr_hugepages
>> - nr_overcommit_hugepages
>> -- nr_pdflush_threads
>> - nr_trim_pages (only if CONFIG_MMU=n)
>> - numa_zonelist_order
>> - oom_dump_tasks
>> @@ -426,16 +425,6 @@ See Documentation/vm/hugetlbpage.txt
>>
>> ==============================================================
>>
>> -nr_pdflush_threads
>> -
>> -The current number of pdflush threads. This value is read-only.
>> -The value changes according to the number of dirty pages in the system.
>> -
>> -When necessary, additional pdflush threads are created, one per second, up to
>> -nr_pdflush_threads_max.
>> -
>> -==============================================================
>> -
>> nr_trim_pages
>>
>> This is available only on NOMMU kernels.
>> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
>> index 539f36c..30ddb8a 100644
>> --- a/fs/fs-writeback.c
>> +++ b/fs/fs-writeback.c
>> @@ -52,11 +52,6 @@ struct wb_writeback_work {
>> struct completion *done; /* set if the caller waits */
>> };
>>
>> -/*
>> - * We don't actually have pdflush, but this one is exported though /proc...
>> - */
>> -int nr_pdflush_threads;
>> -
>> /**
>> * writeback_in_progress - determine whether there is writeback in progress
>> * @bdi: the device's backing_dev_info structure.
>> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
>> index a2b84f5..13b5df7 100644
>> --- a/include/linux/writeback.h
>> +++ b/include/linux/writeback.h
>> @@ -193,9 +193,4 @@ void tag_pages_for_writeback(struct address_space *mapping,
>>
>> void account_page_redirty(struct page *page);
>>
>> -/* pdflush.c */
>> -extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
>> - read-only. */
>> -
>> -
>> #endif /* WRITEBACK_H */
>> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
>> index 4ab1187..e257b61 100644
>> --- a/kernel/sysctl.c
>> +++ b/kernel/sysctl.c
>> @@ -1095,13 +1095,6 @@ static struct ctl_table vm_table[] = {
>> .extra1 = &zero,
>> },
>> {
>> - .procname = "nr_pdflush_threads",
>> - .data = &nr_pdflush_threads,
>> - .maxlen = sizeof nr_pdflush_threads,
>> - .mode = 0444 /* read-only*/,
>> - .proc_handler = proc_dointvec,
>> - },
>> - {
>> .procname = "swappiness",
>> .data = &vm_swappiness,
>> .maxlen = sizeof(vm_swappiness),
>> --
>> 1.7.9.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] remove no longer use of pdflush interface
2012-06-04 13:25 ` Wanpeng Li
@ 2012-06-04 13:34 ` Fengguang Wu
0 siblings, 0 replies; 7+ messages in thread
From: Fengguang Wu @ 2012-06-04 13:34 UTC (permalink / raw)
To: Wanpeng Li
Cc: Alexander Viro, Jan Kara, Andrew Morton, Mel Gorman, Minchan Kim,
Eric W. Biederman, David Howells, James Morris, Ingo Molnar,
linux-doc, linux-kernel, linux-fsdevel, Wanpeng Li, Gavin Shan
On Mon, Jun 04, 2012 at 09:25:53PM +0800, Wanpeng Li wrote:
> On Mon, Jun 04, 2012 at 08:53:56PM +0800, Fengguang Wu wrote:
> >Hi Wanpeng,
> >
> >On Mon, Jun 04, 2012 at 08:40:42PM +0800, Wanpeng Li wrote:
> >> From: Wanpeng Li <liwp@linux.vnet.ibm.com>
> >>
> >> remove no longer use of pdflush interface nr_pdflush_threads.
> >
> >The patch looks good in itself: the nr_pdflush_threads takes no effect
> >for many of the recent kernels. But what's the normal process of
> >interface removal? Shall we carry some warning printk for some time
> >first or whatever?
>
> Hi, Fengguang,
>
> I also want to add an interface of nr_bdi_writeback_threads to statistic
> how many flusher-x:y currently running, do you think it is a good idea?
Hmm, we try to avoid adding interfaces without a good reason. What
would be the use case? Are there real user demands for this at all?
Thanks,
Fengguang
> >> Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
> >> ---
> >> Documentation/sysctl/vm.txt | 11 -----------
> >> fs/fs-writeback.c | 5 -----
> >> include/linux/writeback.h | 5 -----
> >> kernel/sysctl.c | 7 -------
> >> 4 files changed, 28 deletions(-)
> >>
> >> diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
> >> index 96f0ee8..71c17d2 100644
> >> --- a/Documentation/sysctl/vm.txt
> >> +++ b/Documentation/sysctl/vm.txt
> >> @@ -42,7 +42,6 @@ Currently, these files are in /proc/sys/vm:
> >> - mmap_min_addr
> >> - nr_hugepages
> >> - nr_overcommit_hugepages
> >> -- nr_pdflush_threads
> >> - nr_trim_pages (only if CONFIG_MMU=n)
> >> - numa_zonelist_order
> >> - oom_dump_tasks
> >> @@ -426,16 +425,6 @@ See Documentation/vm/hugetlbpage.txt
> >>
> >> ==============================================================
> >>
> >> -nr_pdflush_threads
> >> -
> >> -The current number of pdflush threads. This value is read-only.
> >> -The value changes according to the number of dirty pages in the system.
> >> -
> >> -When necessary, additional pdflush threads are created, one per second, up to
> >> -nr_pdflush_threads_max.
> >> -
> >> -==============================================================
> >> -
> >> nr_trim_pages
> >>
> >> This is available only on NOMMU kernels.
> >> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> >> index 539f36c..30ddb8a 100644
> >> --- a/fs/fs-writeback.c
> >> +++ b/fs/fs-writeback.c
> >> @@ -52,11 +52,6 @@ struct wb_writeback_work {
> >> struct completion *done; /* set if the caller waits */
> >> };
> >>
> >> -/*
> >> - * We don't actually have pdflush, but this one is exported though /proc...
> >> - */
> >> -int nr_pdflush_threads;
> >> -
> >> /**
> >> * writeback_in_progress - determine whether there is writeback in progress
> >> * @bdi: the device's backing_dev_info structure.
> >> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> >> index a2b84f5..13b5df7 100644
> >> --- a/include/linux/writeback.h
> >> +++ b/include/linux/writeback.h
> >> @@ -193,9 +193,4 @@ void tag_pages_for_writeback(struct address_space *mapping,
> >>
> >> void account_page_redirty(struct page *page);
> >>
> >> -/* pdflush.c */
> >> -extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
> >> - read-only. */
> >> -
> >> -
> >> #endif /* WRITEBACK_H */
> >> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> >> index 4ab1187..e257b61 100644
> >> --- a/kernel/sysctl.c
> >> +++ b/kernel/sysctl.c
> >> @@ -1095,13 +1095,6 @@ static struct ctl_table vm_table[] = {
> >> .extra1 = &zero,
> >> },
> >> {
> >> - .procname = "nr_pdflush_threads",
> >> - .data = &nr_pdflush_threads,
> >> - .maxlen = sizeof nr_pdflush_threads,
> >> - .mode = 0444 /* read-only*/,
> >> - .proc_handler = proc_dointvec,
> >> - },
> >> - {
> >> .procname = "swappiness",
> >> .data = &vm_swappiness,
> >> .maxlen = sizeof(vm_swappiness),
> >> --
> >> 1.7.9.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] remove no longer use of pdflush interface
@ 2012-06-05 9:24 Wanpeng Li
2012-06-05 17:43 ` Eric W. Biederman
0 siblings, 1 reply; 7+ messages in thread
From: Wanpeng Li @ 2012-06-05 9:24 UTC (permalink / raw)
To: Fengguang Wu, Rob Landley, Alexander Viro, Eric W. Biederman,
Lucas De Marchi, Andrew Morton, David S. Miller, Jan Kara,
Mel Gorman, Minchan Kim, David Howells, James Morris, Ingo Molnar,
Michel Lespinasse
Cc: linux-doc, linux-kernel, linux-fsdevel, Gavin Shan, Wanpeng Li,
Wanpeng Li
From: Wanpeng Li <liwp@linux.vnet.ibm.com>
------------------
Change in v2:
* add printk warning
* add description in Documentation
------------------
Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
---
.../ABI/obsolete/proc-sys-vm-nr_pdflush_threads | 5 +++++
Documentation/feature-removal-schedule.txt | 8 ++++++++
Documentation/sysctl/vm.txt | 11 -----------
fs/fs-writeback.c | 5 -----
include/linux/sysctl.h | 3 +++
include/linux/writeback.h | 5 -----
kernel/sysctl.c | 18 +++++++++++++-----
kernel/sysctl_binary.c | 2 +-
8 files changed, 30 insertions(+), 27 deletions(-)
create mode 100644 Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads
diff --git a/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads b/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads
new file mode 100644
index 0000000..edbe548
--- /dev/null
+++ b/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads
@@ -0,0 +1,5 @@
+What: /proc/sys/vm/nr_pdflush_threads
+Date: June 2012
+Contact: Wanpeng Li <liwp@linux.vnet.ibm.com>
+Description: Since pdflush is replaced by per-BDI flusher, the interface of old pdflush
+ exported in /proc/sys/vm/ should be removed.
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index e4b5775..7eea1ee 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -6,6 +6,14 @@ be removed from this file.
---------------------------
+What: /proc/sys/vm/nr_pdflush_threads
+When: 2012
+Why: Since pdflush is deprecated, the interface exported in /proc/sys/vm/
+ should be removed.
+Who: Wanpeng Li <liwp@linux.vnet.ibm.com>
+
+---------------------------
+
What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
When: 2012
Why: This optional sub-feature of APM is of dubious reliability,
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 96f0ee8..71c17d2 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -42,7 +42,6 @@ Currently, these files are in /proc/sys/vm:
- mmap_min_addr
- nr_hugepages
- nr_overcommit_hugepages
-- nr_pdflush_threads
- nr_trim_pages (only if CONFIG_MMU=n)
- numa_zonelist_order
- oom_dump_tasks
@@ -426,16 +425,6 @@ See Documentation/vm/hugetlbpage.txt
==============================================================
-nr_pdflush_threads
-
-The current number of pdflush threads. This value is read-only.
-The value changes according to the number of dirty pages in the system.
-
-When necessary, additional pdflush threads are created, one per second, up to
-nr_pdflush_threads_max.
-
-==============================================================
-
nr_trim_pages
This is available only on NOMMU kernels.
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 539f36c..30ddb8a 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -52,11 +52,6 @@ struct wb_writeback_work {
struct completion *done; /* set if the caller waits */
};
-/*
- * We don't actually have pdflush, but this one is exported though /proc...
- */
-int nr_pdflush_threads;
-
/**
* writeback_in_progress - determine whether there is writeback in progress
* @bdi: the device's backing_dev_info structure.
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index c34b4c8..f25be74 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -964,6 +964,9 @@ extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
void __user *, size_t *, loff_t *);
extern int proc_do_large_bitmap(struct ctl_table *, int,
void __user *, size_t *, loff_t *);
+extern int proc_deprecated(struct ctl_table *, int,
+ void __user *, size_t *, loff_t *);
+
/*
* Register a set of sysctl names by calling register_sysctl_table
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index a2b84f5..13b5df7 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -193,9 +193,4 @@ void tag_pages_for_writeback(struct address_space *mapping,
void account_page_redirty(struct page *page);
-/* pdflush.c */
-extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
- read-only. */
-
-
#endif /* WRITEBACK_H */
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 4ab1187..1ab53cb 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1095,11 +1095,9 @@ static struct ctl_table vm_table[] = {
.extra1 = &zero,
},
{
- .procname = "nr_pdflush_threads",
- .data = &nr_pdflush_threads,
- .maxlen = sizeof nr_pdflush_threads,
- .mode = 0444 /* read-only*/,
- .proc_handler = proc_dointvec,
+ .procname = "nr_pdflush_threads",
+ .mode = 0444 /* read-only */,
+ .proc_handler = proc_deprecated,
},
{
.procname = "swappiness",
@@ -2505,6 +2503,15 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
#endif /* CONFIG_PROC_SYSCTL */
+/* notice associated proc deprecated */
+int proc_deprecated(struct ctl_table *table, int write,
+ void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+ printk(KERN_WARNING "%s exported in /proc is deprecated\n",
+ table->procname);
+ return -ENOSYS;
+}
+
/*
* No sense putting this after each symbol definition, twice,
* exception granted :-)
@@ -2517,3 +2524,4 @@ EXPORT_SYMBOL(proc_dointvec_ms_jiffies);
EXPORT_SYMBOL(proc_dostring);
EXPORT_SYMBOL(proc_doulongvec_minmax);
EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax);
+EXPORT_SYMBOL(proc_deprecated);
diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index a650694..65bdcf1 100644
--- a/kernel/sysctl_binary.c
+++ b/kernel/sysctl_binary.c
@@ -147,7 +147,7 @@ static const struct bin_table bin_vm_table[] = {
{ CTL_INT, VM_DIRTY_RATIO, "dirty_ratio" },
/* VM_DIRTY_WB_CS "dirty_writeback_centisecs" no longer used */
/* VM_DIRTY_EXPIRE_CS "dirty_expire_centisecs" no longer used */
- { CTL_INT, VM_NR_PDFLUSH_THREADS, "nr_pdflush_threads" },
+ /* VM_NR_PDFLUSH_THREADS "nr_pdflush_threads" no longer used */
{ CTL_INT, VM_OVERCOMMIT_RATIO, "overcommit_ratio" },
/* VM_PAGEBUF unused */
/* VM_HUGETLB_PAGES "nr_hugepages" no longer used */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] remove no longer use of pdflush interface
2012-06-05 9:24 Wanpeng Li
@ 2012-06-05 17:43 ` Eric W. Biederman
0 siblings, 0 replies; 7+ messages in thread
From: Eric W. Biederman @ 2012-06-05 17:43 UTC (permalink / raw)
To: Wanpeng Li
Cc: Fengguang Wu, Rob Landley, Alexander Viro, Lucas De Marchi,
Andrew Morton, David S. Miller, Jan Kara, Mel Gorman, Minchan Kim,
David Howells, James Morris, Ingo Molnar, Michel Lespinasse,
linux-doc, linux-kernel, linux-fsdevel, Gavin Shan, Wanpeng Li
Wanpeng Li <liwp.linux@gmail.com> writes:
> From: Wanpeng Li <liwp@linux.vnet.ibm.com>
>
> ------------------
>
> Change in v2:
>
> * add printk warning
> * add description in Documentation
Do we have old distributions or other users commonly using
nr_pdflush_threads?
Otherwise we should just remove the tunable as it is a big complicated
no-op.
If someone is using it we need to do the entire rate limited warning
thing. You should at least use printk_ratelimit to keep someone from
dosing the system by writing to the file too fast.
Eric
> ------------------
>
> Signed-off-by: Wanpeng Li <liwp@linux.vnet.ibm.com>
> ---
> .../ABI/obsolete/proc-sys-vm-nr_pdflush_threads | 5 +++++
> Documentation/feature-removal-schedule.txt | 8 ++++++++
> Documentation/sysctl/vm.txt | 11 -----------
> fs/fs-writeback.c | 5 -----
> include/linux/sysctl.h | 3 +++
> include/linux/writeback.h | 5 -----
> kernel/sysctl.c | 18 +++++++++++++-----
> kernel/sysctl_binary.c | 2 +-
> 8 files changed, 30 insertions(+), 27 deletions(-)
> create mode 100644 Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads
>
> diff --git a/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads b/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads
> new file mode 100644
> index 0000000..edbe548
> --- /dev/null
> +++ b/Documentation/ABI/obsolete/proc-sys-vm-nr_pdflush_threads
> @@ -0,0 +1,5 @@
> +What: /proc/sys/vm/nr_pdflush_threads
> +Date: June 2012
> +Contact: Wanpeng Li <liwp@linux.vnet.ibm.com>
> +Description: Since pdflush is replaced by per-BDI flusher, the interface of old pdflush
> + exported in /proc/sys/vm/ should be removed.
> diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
> index e4b5775..7eea1ee 100644
> --- a/Documentation/feature-removal-schedule.txt
> +++ b/Documentation/feature-removal-schedule.txt
> @@ -6,6 +6,14 @@ be removed from this file.
>
> ---------------------------
>
> +What: /proc/sys/vm/nr_pdflush_threads
> +When: 2012
> +Why: Since pdflush is deprecated, the interface exported in /proc/sys/vm/
> + should be removed.
> +Who: Wanpeng Li <liwp@linux.vnet.ibm.com>
> +
> +---------------------------
> +
> What: CONFIG_APM_CPU_IDLE, and its ability to call APM BIOS in idle
> When: 2012
> Why: This optional sub-feature of APM is of dubious reliability,
> diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
> index 96f0ee8..71c17d2 100644
> --- a/Documentation/sysctl/vm.txt
> +++ b/Documentation/sysctl/vm.txt
> @@ -42,7 +42,6 @@ Currently, these files are in /proc/sys/vm:
> - mmap_min_addr
> - nr_hugepages
> - nr_overcommit_hugepages
> -- nr_pdflush_threads
> - nr_trim_pages (only if CONFIG_MMU=n)
> - numa_zonelist_order
> - oom_dump_tasks
> @@ -426,16 +425,6 @@ See Documentation/vm/hugetlbpage.txt
>
> ==============================================================
>
> -nr_pdflush_threads
> -
> -The current number of pdflush threads. This value is read-only.
> -The value changes according to the number of dirty pages in the system.
> -
> -When necessary, additional pdflush threads are created, one per second, up to
> -nr_pdflush_threads_max.
> -
> -==============================================================
> -
> nr_trim_pages
>
> This is available only on NOMMU kernels.
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index 539f36c..30ddb8a 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -52,11 +52,6 @@ struct wb_writeback_work {
> struct completion *done; /* set if the caller waits */
> };
>
> -/*
> - * We don't actually have pdflush, but this one is exported though /proc...
> - */
> -int nr_pdflush_threads;
> -
> /**
> * writeback_in_progress - determine whether there is writeback in progress
> * @bdi: the device's backing_dev_info structure.
> diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
> index c34b4c8..f25be74 100644
> --- a/include/linux/sysctl.h
> +++ b/include/linux/sysctl.h
> @@ -964,6 +964,9 @@ extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int,
> void __user *, size_t *, loff_t *);
> extern int proc_do_large_bitmap(struct ctl_table *, int,
> void __user *, size_t *, loff_t *);
> +extern int proc_deprecated(struct ctl_table *, int,
> + void __user *, size_t *, loff_t *);
> +
>
> /*
> * Register a set of sysctl names by calling register_sysctl_table
> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> index a2b84f5..13b5df7 100644
> --- a/include/linux/writeback.h
> +++ b/include/linux/writeback.h
> @@ -193,9 +193,4 @@ void tag_pages_for_writeback(struct address_space *mapping,
>
> void account_page_redirty(struct page *page);
>
> -/* pdflush.c */
> -extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
> - read-only. */
> -
> -
> #endif /* WRITEBACK_H */
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index 4ab1187..1ab53cb 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -1095,11 +1095,9 @@ static struct ctl_table vm_table[] = {
> .extra1 = &zero,
> },
> {
> - .procname = "nr_pdflush_threads",
> - .data = &nr_pdflush_threads,
> - .maxlen = sizeof nr_pdflush_threads,
> - .mode = 0444 /* read-only*/,
> - .proc_handler = proc_dointvec,
> + .procname = "nr_pdflush_threads",
> + .mode = 0444 /* read-only */,
> + .proc_handler = proc_deprecated,
> },
> {
> .procname = "swappiness",
> @@ -2505,6 +2503,15 @@ int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int write,
>
> #endif /* CONFIG_PROC_SYSCTL */
>
> +/* notice associated proc deprecated */
> +int proc_deprecated(struct ctl_table *table, int write,
> + void __user *buffer, size_t *lenp, loff_t *ppos)
> +{
> + printk(KERN_WARNING "%s exported in /proc is deprecated\n",
> + table->procname);
> + return -ENOSYS;
> +}
> +
> /*
> * No sense putting this after each symbol definition, twice,
> * exception granted :-)
> @@ -2517,3 +2524,4 @@ EXPORT_SYMBOL(proc_dointvec_ms_jiffies);
> EXPORT_SYMBOL(proc_dostring);
> EXPORT_SYMBOL(proc_doulongvec_minmax);
> EXPORT_SYMBOL(proc_doulongvec_ms_jiffies_minmax);
> +EXPORT_SYMBOL(proc_deprecated);
> diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
> index a650694..65bdcf1 100644
> --- a/kernel/sysctl_binary.c
> +++ b/kernel/sysctl_binary.c
> @@ -147,7 +147,7 @@ static const struct bin_table bin_vm_table[] = {
> { CTL_INT, VM_DIRTY_RATIO, "dirty_ratio" },
> /* VM_DIRTY_WB_CS "dirty_writeback_centisecs" no longer used */
> /* VM_DIRTY_EXPIRE_CS "dirty_expire_centisecs" no longer used */
> - { CTL_INT, VM_NR_PDFLUSH_THREADS, "nr_pdflush_threads" },
> + /* VM_NR_PDFLUSH_THREADS "nr_pdflush_threads" no longer used */
> { CTL_INT, VM_OVERCOMMIT_RATIO, "overcommit_ratio" },
> /* VM_PAGEBUF unused */
> /* VM_HUGETLB_PAGES "nr_hugepages" no longer used */
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-05 17:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04 12:40 [PATCH] remove no longer use of pdflush interface Wanpeng Li
2012-06-04 12:53 ` Fengguang Wu
2012-06-04 13:14 ` Minchan Kim
2012-06-04 13:25 ` Wanpeng Li
2012-06-04 13:34 ` Fengguang Wu
-- strict thread matches above, loose matches on Subject: below --
2012-06-05 9:24 Wanpeng Li
2012-06-05 17:43 ` Eric W. Biederman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).