Skip to contentSkip to conversation

Fix O_SYNC speedup for generic_file_write_nolock

PATCH In review Suparna Bhattacharya 3 participants 8 messages Nov 8, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix O_SYNC speedup for generic_file_write_nolock

The O_SYNC speedup patches missed the generic_file_xxx_nolock cases, which means that pages weren't actually getting sync'ed in those cases. This patch fixes that.

 include/linux/writeback.h |    2 +
 mm/filemap.c              |   67 +++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 66 insertions(+), 3 deletions(-)
include/linux/writeback.h +2 -0
diff -urp -X dontdiff2 linux-2.6.10-rc1/include/linux/writeback.h linux-2.6.10-rc1-aio/include/linux/writeback.h
@@ -106,6 +106,8 @@ int pdflush_operation(void (*fn)(unsigne
 int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
 int sync_page_range(struct inode *inode, struct address_space *mapping,
 			loff_t pos, size_t count);
+int sync_page_range_nolock(struct inode *inode, struct address_space
+		*mapping, loff_t pos, size_t count);
 
 /* pdflush.c */
 extern int nr_pdflush_threads;	/* Global so it can be exported to sysctl
mm/filemap.c +64 -3

97 lines not on this page · raw message

Signature · 3 lines
Suparna Bhattacharya ([email protected])
Linux Technology Center
IBM Software Lab, India
#1 lore raw
Quoted 1 line

+EXPORT_SYMBOL(sync_page_range_nolock);

why adding this export? nothing appears to be using it (AIO isn't a module after all)

#2 lore raw
Quoted 5 lines · Arjan van de Ven
Quoted 1 line

+EXPORT_SYMBOL(sync_page_range_nolock);

why adding this export? nothing appears to be using it (AIO isn't a module after all)

This doesn't have anything to do with AIO. Filesystems which implement the equivalent of generic_file_write_nolock may use sync_page_range_nolock for O_SYNC.

Does that help clarify ?

Regards
Suparna

Signature · 3 lines
Suparna Bhattacharya ([email protected])
Linux Technology Center
IBM Software Lab, India
#3 lore raw
Quoted 4 lines · Suparna Bhattacharya
Quoted 3 lines · Arjan van de Ven
Quoted 1 line

+EXPORT_SYMBOL(sync_page_range_nolock);

Quoted 8 lines
Quoted 2 lines

why adding this export? nothing appears to be using it (AIO isn't a module after all)

This doesn't have anything to do with AIO. Filesystems which implement the equivalent of generic_file_write_nolock may use sync_page_range_nolock for O_SYNC.

Does that help clarify ?

not really; none do so far so how about not adding the export until someone does use it ?

#4 lore raw
Quoted 8 lines · Arjan van de Ven
Quoted 7 lines · Suparna Bhattacharya
Quoted 5 lines · Arjan van de Ven
Quoted 1 line

+EXPORT_SYMBOL(sync_page_range_nolock);

why adding this export? nothing appears to be using it (AIO isn't a module after all)

Quoted 8 lines
Quoted 5 lines

This doesn't have anything to do with AIO. Filesystems which implement the equivalent of generic_file_write_nolock may use sync_page_range_nolock for O_SYNC.

Does that help clarify ?

not really; none do so far so how about not adding the export until someone does use it ?

It is just like sync_page_range() from akpm's original O_SYNC speedup patch. Andrew, do we keep or remove the export ?

Regards
Suparna

Signature · 3 lines
Suparna Bhattacharya ([email protected])
Linux Technology Center
IBM Software Lab, India
#5 lore raw
In reply to Arjan van de Ven
Quoted 8 lines · Arjan van de Ven
Quoted 7 lines · Suparna Bhattacharya
Quoted 5 lines · Arjan van de Ven
Quoted 1 line

+EXPORT_SYMBOL(sync_page_range_nolock);

why adding this export? nothing appears to be using it (AIO isn't a module after all)

Quoted 8 lines
Quoted 5 lines

This doesn't have anything to do with AIO. Filesystems which implement the equivalent of generic_file_write_nolock may use sync_page_range_nolock for O_SYNC.

Does that help clarify ?

not really; none do so far so how about not adding the export until someone does use it ?

OCFS2 uses generic_file_write_nolock(), and as such we might
want to look into this problem and the sync_page_range_nolock() fix.

Joel

Signature · 9 lines
"I always thought the hardest questions were those I could not answer.
 Now I know they are the ones I can never ask."
			- Charlie Watkins

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: [email protected]
Phone: (650) 506-8127
#6 lore raw
Quoted 2 lines · Joel Becker

OCFS2 uses generic_file_write_nolock(), and as such we might
want to look into this problem and the sync_page_range_nolock() fix.

are you going to submit ocfs2 soon for inclusion ?

#7 lore raw
Quoted 5 lines · Arjan van de Ven
Quoted 2 lines · Joel Becker

OCFS2 uses generic_file_write_nolock(), and as such we might
want to look into this problem and the sync_page_range_nolock() fix.

are you going to submit ocfs2 soon for inclusion ?

FSVO "soon", yes.

Joel

Signature · 9 lines
Life's Little Instruction Book #157 

	"Take time to smell the roses."

Joel Becker
Senior Member of Technical Staff
Oracle Corporation
E-mail: [email protected]
Phone: (650) 506-8127