nfsd: queue laundrette to filecache_wq instead of system_wq
Subsystems (2)
Jeff Layton
maintainerPATCH 1/1 nfsd: queue laundrette to filecache_wq instead of system_wq
nfsd has grown a dedicated workqueue for the filecache, but this job is still queued to the system_wq. Change it to use the filecache_wq.
--- fs/nfsd/filecache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/filecache.c +1 -1
@@ -212,7 +212,7 @@ static voidnfsd_file_schedule_laundrette (void) {if (test_bit (NFSD_FILE_CACHE_UP , &nfsd_file_flags)) -queue_delayed_work (system_wq, &nfsd_filecache_laundrette, +queue_delayed_work (nfsd_filecache_wq, &nfsd_filecache_laundrette,NFSD_LAUNDRETTE_DELAY ); }
Signature · 1 line
2.38.1
Hi Jeff -
Quoted 4 lines · Jeff Layton
nfsd has grown a dedicated workqueue for the filecache, but this job is still queued to the
system_wq. Change it to use thefilecache_wq.
Actually... there doesn't seem to be anything special about nfsd_filecache_wq. 9542e6a643fc ("nfsd: Containerise filecache laundrette") does not make clear why it was added.
Playing devil's advocate: why not make the converse change and replace it with system_wq?
Quoted 21 lines
Signed-off-by Jeff Layton <[email protected]>---
fs/nfsd/filecache.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/filecache.c +1
-1@@ -212,7 +212,7 @@ static voidnfsd_file_schedule_laundrette (void) {if (test_bit (NFSD_FILE_CACHE_UP , &nfsd_file_flags)) -queue_delayed_work (system_wq, &nfsd_filecache_laundrette, +queue_delayed_work (nfsd_filecache_wq, &nfsd_filecache_laundrette,NFSD_LAUNDRETTE_DELAY ); }Signature · 1 line
2.38.1
--
Chuck Lever
Jeff Layton
maintainerQuoted 7 lines · Chuck Lever III
Hi Jeff -
Quoted 4 lines · Jeff Layton
nfsd has grown a dedicated workqueue for the filecache, but this job is still queued to the
system_wq. Change it to use thefilecache_wq.
Quoted 7 lines
Actually... there doesn't seem to be anything special about
nfsd_filecache_wq.9542e6a643fc("nfsd: Containerise filecache laundrette") does not make clear why it was added.Playing devil's advocate: why not make the converse change and replace it with
system_wq?
Good question.
At one time, allocating a workqueue gave you a dedicated pool of threads, but that's no longer the case.
Documentation/core-api/workqueue.rst says: "A wq no longer manages execution resources but serves as a domain for forward progress guarantee, flush and work item attributes."
Given that we're allocating this workqueue exactly the same way we allocate the system_wq, I don't think we need our own workqueue at all. I'd be fine with changing this to be the reverse if you prefer.
Quoted 28 lines
Quoted 22 lines
Signed-off-by Jeff Layton <[email protected]>---
fs/nfsd/filecache.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/filecache.c +1
-1@@ -212,7 +212,7 @@ static voidnfsd_file_schedule_laundrette (void) {if (test_bit (NFSD_FILE_CACHE_UP , &nfsd_file_flags)) -queue_delayed_work (system_wq, &nfsd_filecache_laundrette, +queue_delayed_work (nfsd_filecache_wq, &nfsd_filecache_laundrette,NFSD_LAUNDRETTE_DELAY ); }Signature · 1 line
2.38.1--
Chuck Lever
Signature · 1 line
Jeff Layton <[email protected]>
Quoted 25 lines · Jeff Layton
Quoted 7 lines · Chuck Lever III
Hi Jeff -
Quoted 4 lines · Jeff Layton
nfsd has grown a dedicated workqueue for the filecache, but this job is still queued to the
system_wq. Change it to use thefilecache_wq.Quoted 7 lines
Actually... there doesn't seem to be anything special about
nfsd_filecache_wq.9542e6a643fc("nfsd: Containerise filecache laundrette") does not make clear why it was added.Playing devil's advocate: why not make the converse change and replace it with
system_wq?Good question.
At one time, allocating a workqueue gave you a dedicated pool of threads, but that's no longer the case.
Quoted 7 lines
Documentation/core-api/workqueue.rstsays: "A wq no longer manages execution resources but serves as a domain for forward progress guarantee, flush and work item attributes."Given that we're allocating this workqueue exactly the same way we allocate the
system_wq, I don't think we need our own workqueue at all. I'd be fine with changing this to be the reverse if you prefer.
One less thing to fail on module initialization. Go for it.
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Signed-off-by Jeff Layton <[email protected]>---
fs/nfsd/filecache.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)fs/nfsd/filecache.c +1
-1@@ -212,7 +212,7 @@ static voidnfsd_file_schedule_laundrette (void) {if (test_bit (NFSD_FILE_CACHE_UP , &nfsd_file_flags)) -queue_delayed_work (system_wq, &nfsd_filecache_laundrette, +queue_delayed_work (nfsd_filecache_wq, &nfsd_filecache_laundrette,NFSD_LAUNDRETTE_DELAY ); }
Quoted 12 lines
Quoted 9 lines
Quoted 3 lines
Signature · 1 line
2.38.1--
Chuck LeverSignature · 1 line
Jeff Layton <[email protected]>
--
Chuck Lever