* Re: [PATCH] Writeback page range hint
[not found] <200408232138.i7NLcfJd019125@hera.kernel.org>
@ 2004-08-24 1:07 ` Dave Jones
2004-08-24 1:14 ` Andrew Morton
2004-08-24 1:29 ` wli
0 siblings, 2 replies; 5+ messages in thread
From: Dave Jones @ 2004-08-24 1:07 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Andrew Morton, suparna
On Mon, Aug 23, 2004 at 07:59:27PM +0000, Linux Kernel wrote:
> ChangeSet 1.2034, 2004/08/23 12:59:27-07:00, akpm@osdl.org
>
> [PATCH] Writeback page range hint
>
> Modify mpage_writepages to optionally only write back dirty pages within a
> specified range in a file (as in the case of O_SYNC). Cheat a little to avoid
> changes to prototypes of aops - just put the <start, end> hint into the
> writeback_control struct instead. If <start, end> are not set, then default
> to writing back all the mapping's dirty pages.
FYI, this chunk...
> long pages_skipped; /* Pages which were not written */
> - int nonblocking; /* Don't get stuck on request queues */
> - int encountered_congestion; /* An output: a queue is full */
> - int for_kupdate; /* A kupdate writeback */
> - int for_reclaim; /* Invoked from the page allocator */
> +
> + /*
> + * For a_ops->writepages(): is start or end are non-zero then this is
> + * a hint that the filesystem need only write out the pages inside that
> + * byterange. The byte at `end' is included in the writeout request.
> + */
> + loff_t start;
> + loff_t end;
> +
> + int nonblocking:1; /* Don't get stuck on request queues */
> + int encountered_congestion:1; /* An output: a queue is full */
> + int for_kupdate:1; /* A kupdate writeback */
> + int for_reclaim:1; /* Invoked from the page allocator */
Causes sparse spew..
include/linux/writeback.h:54:19: warning: dubious one-bit signed bitfield
include/linux/writeback.h:55:30: warning: dubious one-bit signed bitfield
include/linux/writeback.h:56:19: warning: dubious one-bit signed bitfield
include/linux/writeback.h:57:19: warning: dubious one-bit signed bitfield
Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Writeback page range hint
2004-08-24 1:07 ` [PATCH] Writeback page range hint Dave Jones
@ 2004-08-24 1:14 ` Andrew Morton
2004-08-24 1:18 ` Dave Jones
2004-08-24 1:29 ` wli
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2004-08-24 1:14 UTC (permalink / raw)
To: Dave Jones; +Cc: linux-kernel, suparna
Dave Jones <davej@redhat.com> wrote:
>
> FYI, this chunk...
>
> > long pages_skipped; /* Pages which were not written */
> > - int nonblocking; /* Don't get stuck on request queues */
> > - int encountered_congestion; /* An output: a queue is full */
> > - int for_kupdate; /* A kupdate writeback */
> > - int for_reclaim; /* Invoked from the page allocator */
> > +
> > + /*
> > + * For a_ops->writepages(): is start or end are non-zero then this is
> > + * a hint that the filesystem need only write out the pages inside that
> > + * byterange. The byte at `end' is included in the writeout request.
> > + */
> > + loff_t start;
> > + loff_t end;
> > +
> > + int nonblocking:1; /* Don't get stuck on request queues */
> > + int encountered_congestion:1; /* An output: a queue is full */
> > + int for_kupdate:1; /* A kupdate writeback */
> > + int for_reclaim:1; /* Invoked from the page allocator */
>
> Causes sparse spew..
>
> include/linux/writeback.h:54:19: warning: dubious one-bit signed bitfield
> include/linux/writeback.h:55:30: warning: dubious one-bit signed bitfield
> include/linux/writeback.h:56:19: warning: dubious one-bit signed bitfield
> include/linux/writeback.h:57:19: warning: dubious one-bit signed bitfield
That's fussy of it. I assume this shuts it up?
--- 25/include/linux/writeback.h~writeback-sparse-warning-fix 2004-08-23 18:12:09.669385176 -0700
+++ 25-akpm/include/linux/writeback.h 2004-08-23 18:12:44.064156376 -0700
@@ -51,10 +51,10 @@ struct writeback_control {
loff_t start;
loff_t end;
- int nonblocking:1; /* Don't get stuck on request queues */
- int encountered_congestion:1; /* An output: a queue is full */
- int for_kupdate:1; /* A kupdate writeback */
- int for_reclaim:1; /* Invoked from the page allocator */
+ unsigned int nonblocking:1; /* Don't get stuck on request queues */
+ unsigned int encountered_congestion:1; /* An output: a queue is full */
+ unsigned int for_kupdate:1; /* A kupdate writeback */
+ unsigned int for_reclaim:1; /* Invoked from the page allocator */
};
/*
_
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Writeback page range hint
2004-08-24 1:14 ` Andrew Morton
@ 2004-08-24 1:18 ` Dave Jones
2004-08-24 1:21 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Dave Jones @ 2004-08-24 1:18 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, suparna
On Mon, Aug 23, 2004 at 06:14:00PM -0700, Andrew Morton wrote:
> > > + int nonblocking:1; /* Don't get stuck on request queues */
> > > + int encountered_congestion:1; /* An output: a queue is full */
> > > + int for_kupdate:1; /* A kupdate writeback */
> > > + int for_reclaim:1; /* Invoked from the page allocator */
> >
> > Causes sparse spew..
> >
> > include/linux/writeback.h:54:19: warning: dubious one-bit signed bitfield
> > include/linux/writeback.h:55:30: warning: dubious one-bit signed bitfield
> > include/linux/writeback.h:56:19: warning: dubious one-bit signed bitfield
> > include/linux/writeback.h:57:19: warning: dubious one-bit signed bitfield
>
> That's fussy of it. I assume this shuts it up?
very likely (its 2am, and I'm feeling too lazy to check).
though, is there any real reason why they are bitfields at all ?
I'll double check it in the morning when the nightly sparse cron jobs mail me 8-)
Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Writeback page range hint
2004-08-24 1:18 ` Dave Jones
@ 2004-08-24 1:21 ` Andrew Morton
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2004-08-24 1:21 UTC (permalink / raw)
To: Dave Jones; +Cc: linux-kernel, suparna
Dave Jones <davej@redhat.com> wrote:
>
> On Mon, Aug 23, 2004 at 06:14:00PM -0700, Andrew Morton wrote:
>
> > > > + int nonblocking:1; /* Don't get stuck on request queues */
> > > > + int encountered_congestion:1; /* An output: a queue is full */
> > > > + int for_kupdate:1; /* A kupdate writeback */
> > > > + int for_reclaim:1; /* Invoked from the page allocator */
> > >
> > > Causes sparse spew..
> > >
> > > include/linux/writeback.h:54:19: warning: dubious one-bit signed bitfield
> > > include/linux/writeback.h:55:30: warning: dubious one-bit signed bitfield
> > > include/linux/writeback.h:56:19: warning: dubious one-bit signed bitfield
> > > include/linux/writeback.h:57:19: warning: dubious one-bit signed bitfield
> >
> > That's fussy of it. I assume this shuts it up?
>
> very likely (its 2am, and I'm feeling too lazy to check).
That's the middle of the working day.
> though, is there any real reason why they are bitfields at all ?
That should have been in the changelog. Bad Suparna.
These structures are allocated on the stack in the (deep) writeback paths.
Saving a few bytes there does seem to be worth the increased code size.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Writeback page range hint
2004-08-24 1:07 ` [PATCH] Writeback page range hint Dave Jones
2004-08-24 1:14 ` Andrew Morton
@ 2004-08-24 1:29 ` wli
1 sibling, 0 replies; 5+ messages in thread
From: wli @ 2004-08-24 1:29 UTC (permalink / raw)
To: Dave Jones, Linux Kernel Mailing List, Andrew Morton, suparna
On Tue, Aug 24, 2004 at 02:07:23AM +0100, Dave Jones wrote:
> Causes sparse spew..
> include/linux/writeback.h:54:19: warning: dubious one-bit signed bitfield
> include/linux/writeback.h:55:30: warning: dubious one-bit signed bitfield
> include/linux/writeback.h:56:19: warning: dubious one-bit signed bitfield
> include/linux/writeback.h:57:19: warning: dubious one-bit signed bitfield
Does this help?
Index: mm4-2.6.8.1/include/linux/writeback.h
===================================================================
--- mm4-2.6.8.1.orig/include/linux/writeback.h 2004-08-23 16:11:10.318739856 -0700
+++ mm4-2.6.8.1/include/linux/writeback.h 2004-08-23 18:26:45.790960088 -0700
@@ -51,10 +51,10 @@
loff_t start;
loff_t end;
- int nonblocking:1; /* Don't get stuck on request queues */
- int encountered_congestion:1; /* An output: a queue is full */
- int for_kupdate:1; /* A kupdate writeback */
- int for_reclaim:1; /* Invoked from the page allocator */
+ unsigned nonblocking:1, /* Don't get stuck on request queues */
+ encountered_congestion:1, /* An output: a queue is full */
+ for_kupdate:1, /* A kupdate writeback */
+ for_reclaim:1; /* Invoked from the page allocator */
};
/*
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-08-24 1:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200408232138.i7NLcfJd019125@hera.kernel.org>
2004-08-24 1:07 ` [PATCH] Writeback page range hint Dave Jones
2004-08-24 1:14 ` Andrew Morton
2004-08-24 1:18 ` Dave Jones
2004-08-24 1:21 ` Andrew Morton
2004-08-24 1:29 ` wli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox