Skip to contentSkip to conversation

barriers vs. reads

DISCUSSION Werner Almesberger 6 participants 27 messages Jun 22, 2004 – Jun 24, 2004 VFS

lore
Share & tools
lore
#0 lore raw

I'm working on an elevator with priorities, and I'm wondering what semantics are expected from barriers when it comes to reads.

My problem with read barriers is that they can upset priorities quite a bit, by forcing the entire queue to be processed before any new (possibly timing-critical) reads are allowed.

So, is there anything that actually depends on barriers also constraining read - or, more likely, read vs. write - order ? If not, will there be ?

Also, it seems, but is never quite explicitly spelt out, that an elevator is never really supposed to look for barriers in rq->flags, but can solely rely on the insertion position as an indication for barriers. Is this true ?

Thanks,
- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#1 lore raw
Quoted 10 lines · Werner Almesberger

I'm working on an elevator with priorities, and I'm wondering what semantics are expected from barriers when it comes to reads.

My problem with read barriers is that they can upset priorities quite a bit, by forcing the entire queue to be processed before any new (possibly timing-critical) reads are allowed.

So, is there anything that actually depends on barriers also constraining read - or, more likely, read vs. write - order ? If not, will there be ?

I don't think a read-barrier currently has a meaning. A write barrier will force ordering for later reads too, of course.

Quoted 4 lines

Also, it seems, but is never quite explicitly spelt out, that an elevator is never really supposed to look for barriers in rq->flags, but can solely rely on the insertion position as an indication for barriers. Is this true ?

It can't, the insert position doesn't tell you whether it's a barrier or not. You have to check ->flags for that.

Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 2 lines · Jens Axboe

I don't think a read-barrier currently has a meaning. A write barrier will force ordering for later reads too, of course.

That's one of the problem spots with priorities: if there are a lot of writes in the queue, high-priority reads will be delayed for a long time.

But do we have cases where reads must not cross write barriers ?

Quoted 2 lines

It can't, the insert position doesn't tell you whether it's a barrier or not. You have to check ->flags for that.

Yet deadline, AS, and CFQ don't do any such check :-)

- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#3 lore raw
Quoted 7 lines · Werner Almesberger
Quoted 2 lines · Jens Axboe

I don't think a read-barrier currently has a meaning. A write barrier will force ordering for later reads too, of course.

That's one of the problem spots with priorities: if there are a lot of writes in the queue, high-priority reads will be delayed for a long time.

If there are lots of barrier writes, you mean?

Quoted 1 line

But do we have cases where reads must not cross write barriers ?

To me, it's the expected behaviour. If you issue a barrier write, a read issued later should not be able to fetch old data.

Quoted 4 lines
Quoted 2 lines

It can't, the insert position doesn't tell you whether it's a barrier or not. You have to check ->flags for that.

Yet deadline, AS, and CFQ don't do any such check :-)

Hmm? Recently this was moved into __elv_add_request() to make sure that a barrier always implies ELEVATOR_INSERT_BACK so these checks were removed. deadline still has it though:

        /* barriers must flush the reorder queue */
        if (unlikely(rq->flags & (REQ_SOFTBARRIER | REQ_HARDBARRIER)
                        && where == ELEVATOR_INSERT_SORT))
                where = ELEVATOR_INSERT_BACK;

this can be removed now, though. So it's definitely there, if you are using a recent kernel you can assume that INSERT_BACK implies a barrier.

Signature · 1 line
Jens Axboe
#4 lore raw
Quoted 1 line · Jens Axboe

If there are lots of barrier writes, you mean?

If there are a lot of writes before the barrier. Then the reads after the barrier have to wait for all these writes to complete. Of course, things get even worse if you have a lot of barriers, in addition to there being lots of writes.

Quoted 2 lines

To me, it's the expected behaviour. If you issue a barrier write, a read issued later should not be able to fetch old data.

... which pretty much kills the idea of short predictable queuing delays :-(

Quoted 1 line

Hmm? Recently this was moved into __elv_add_request()

Ah, okay, different definition of where the elevator starts ;-) Yes, I saw that.

BTW, in what cases would ELEVATOR_INSERT_FRONT combined with a barrier make sense ?

- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#5 lore raw
Quoted 7 lines · Werner Almesberger
Quoted 1 line · Jens Axboe

If there are lots of barrier writes, you mean?

If there are a lot of writes before the barrier. Then the reads after the barrier have to wait for all these writes to complete. Of course, things get even worse if you have a lot of barriers, in addition to there being lots of writes.

There's nothing you can do about that, in my opinion. Barriers are bad for io scheduler performance, that's a given.

Quoted 5 lines
Quoted 2 lines

To me, it's the expected behaviour. If you issue a barrier write, a read issued later should not be able to fetch old data.

... which pretty much kills the idea of short predictable queuing delays :-(

So you can't support guarenteed low delays with lots of writes and barriers, big deal. If you need hard guarantees, you need to tailor the environment. IMHO this is no different than the regular linux code base not supporting hard realtime processing.

Quoted 7 lines
Quoted 1 line

Hmm? Recently this was moved into __elv_add_request()

Ah, okay, different definition of where the elevator starts ;-) Yes, I saw that.

BTW, in what cases would ELEVATOR_INSERT_FRONT combined with a barrier make sense ?

It wouldn't really, INSERT_BACK is the only one that really makes sense. But if you do an elv_requeue_request() (ide barrier does this) to reinsert a barrier, it would have the barrier bit set but need to go to the front anyways. SCSI does it too, come to think of it.

Signature · 1 line
Jens Axboe
#6 lore raw
In reply to Jens Axboe
Quoted 4 lines · Jens Axboe
Quoted 1 line

But do we have cases where reads must not cross write barriers ?

To me, it's the expected behaviour. If you issue a barrier write, a read issued later should not be able to fetch old data.

Two things:

1. A read _which doesn't overlap writes before the barrier_ should be ok before the barrier with no visible change.

So, look at the block numbers and permit reordering if there's no overlap. This reordering is semantically invisible.

2. Other than O_DIRECT, can the I/O subsystem issue reads that overlap writes in flight? Surely that never occurs?

If it never occurs, then reads can be safely moved before write barriers without looking at block numbers.

-- Jamie

#7 lore raw
Quoted 6 lines · Jamie Lokier
Quoted 4 lines · Jens Axboe
Quoted 1 line

But do we have cases where reads must not cross write barriers ?

To me, it's the expected behaviour. If you issue a barrier write, a read issued later should not be able to fetch old data.

Quoted 7 lines

Two things:

1. A read _which doesn't overlap writes before the barrier_ should be ok before the barrier with no visible change.

So, look at the block numbers and permit reordering if there's no overlap. This reordering is semantically invisible.

You mean a read that doesn't contain sectors that overlap with the barrier writes? Yes that would be fine.

It's easier said than done, though. Current io schedulers don't handle barriers in a very fast fashion - they push all pending requests from the internal sorted tree to the dispatch list, the latter which is always accessed in FIFO like fashion (io scheduler adds to tail, driver eats from the head). So if you wanted to optimize this, that has to be changed.

Quoted 2 lines

2. Other than O_DIRECT, can the I/O subsystem issue reads that overlap writes in flight? Surely that never occurs?

No, it can only happen for reads that don't go through the page cache.

Quoted 2 lines

If it never occurs, then reads can be safely moved before write barriers without looking at block numbers.

It can happen with direct io of any sort, the solution has to take this into account. That's why we currently have handling for rbtree aliases as well.

Signature · 1 line
Jens Axboe
#8 lore raw
Quoted 11 lines
Quoted 2 lines

2. Other than O_DIRECT, can the I/O subsystem issue reads that overlap writes in flight? Surely that never occurs?

No, it can only happen for reads that don't go through the page cache.

Quoted 2 lines

If it never occurs, then reads can be safely moved before write barriers without looking at block numbers.

It can happen with direct io of any sort, the solution has to take this into account. That's why we currently have handling for rbtree aliases as well.

Are you saying that if Sector A contains "foo", and I do a __make_request(Write, Sector A, "bar") and then a __make_request(Read, Sector A), the read might read "foo"? Assuming no barriers.

As I understand it, the topic of discussion is completely outside the realm of the page cache and open() flags -- it's all down below that.

--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems

#9 lore raw
Quoted 8 lines · Bryan Henderson
Quoted 8 lines
Quoted 2 lines

2. Other than O_DIRECT, can the I/O subsystem issue reads that overlap writes in flight? Surely that never occurs?

No, it can only happen for reads that don't go through the page cache.

Quoted 2 lines

If it never occurs, then reads can be safely moved before write barriers without looking at block numbers.

Quoted 7 lines
Quoted 3 lines

It can happen with direct io of any sort, the solution has to take this into account. That's why we currently have handling for rbtree aliases as well.

Are you saying that if Sector A contains "foo", and I do a __make_request(Write, Sector A, "bar") and then a __make_request(Read, Sector A), the read might read "foo"? Assuming no barriers.

Well no, even for direct io we maintain ordering if you hit an alias. See cfq_add_crq_rb() in cfq-iosched.c for example. AS handles it differently, but result is the same. At least the io is issued in that order, so if the underlying storage hardware doesn't mess it up, there is no problem.

If you have overlapping requests, then you could get into serious trouble. You should not do that.

Quoted 2 lines

As I understand it, the topic of discussion is completely outside the realm of the page cache and open() flags -- it's all down below that.

The page cache will make sure don't see "foo", since you'll wait for the page to unlocked at the end of io. The above description is only valid for direct io, this is where the alias handling works.

Signature · 1 line
Jens Axboe
#10 lore raw
Quoted 8 lines
Quoted 3 lines

Are you saying that if Sector A contains "foo", and I do a __make_request(Write, Sector A, "bar") and then a __make_request(Read, Sector A), the read might read "foo"? Assuming no barriers.

Well no, even for direct io we maintain ordering if you hit an alias.
...
If you have overlapping requests, then you could get into serious trouble. You should not do that.

What is an alias, and how is it different from an overlap?

Also: The question is about the block layer, but you answer in terms of direct I/O. Does __make_request() know what direct I/O is? I thought it just did I/O for I/O's sake.

Quoted 2 lines

The page cache will make sure don't see "foo", since you'll wait for the page to unlocked at the end of io.

If it's a page cache page, the point is moot because the elevator would never see the sequence of requests in question. But my question is about the general case, with no assumptions about who is calling __make_request() and why.

#11 lore raw
Quoted 10 lines · Bryan Henderson
Quoted 8 lines
Quoted 3 lines

Are you saying that if Sector A contains "foo", and I do a __make_request(Write, Sector A, "bar") and then a __make_request(Read, Sector A), the read might read "foo"? Assuming no barriers.

Well no, even for direct io we maintain ordering if you hit an alias.
...
If you have overlapping requests, then you could get into serious trouble. You should not do that.

What is an alias, and how is it different from an overlap?

It's just an internal problem - when you add a request to the rbtree of the io scheduler, and an existing request with that key (start location) already exists.

Quoted 3 lines

Also: The question is about the block layer, but you answer in terms of direct I/O. Does __make_request() know what direct I/O is? I thought it just did I/O for I/O's sake.

The block layer doesn't know and it doesn't care. I answer in terms of direct IO since that's the only way you'll get a request issued for the same sector. As mentioned below, the page cache prevents that from happening.

Quoted 5 lines
Quoted 2 lines

The page cache will make sure don't see "foo", since you'll wait for the page to unlocked at the end of io.

If it's a page cache page, the point is moot because the elevator would never see the sequence of requests in question. But my question is about

Precisely.

Quoted 2 lines

the general case, with no assumptions about who is calling __make_request() and why.

As stated earlier in this thread, the io scheduler makes no real attempt to cope with this scenario. Users of direct io are expected to syncronize themselves. It would be pretty silly not to do this, if only for performance reasons. The fact that the io scheduler catches "aliases" is not a feature and not something that is really useful in this respect, since it's only a slight subset of the general problem of overlapping ios.

Signature · 1 line
Jens Axboe
#12 lore raw
In reply to Bryan Henderson
Quoted 11 lines · Bryan Henderson

Also: The question is about the block layer, but you answer in terms of direct I/O. Does __make_request() know what direct I/O is? I thought it just did I/O for I/O's sake.

Quoted 2 lines

The page cache will make sure don't see "foo", since you'll wait for the page to unlocked at the end of io.

If it's a page cache page, the point is moot because the elevator would never see the sequence of requests in question. But my question is about the general case, with no assumptions about who is calling __make_request() and why.

This whole thread is asking a simple question: what shall we define "I/O write barrier" to mean? Does it force an ordering for reads after the barrier which overlap writes before the barrier, or not?

We are free to define the answer as "yes" or "no", according to whichever is more useful. Or even to define two kinds of barrier, if that would be useful. (E.g. I wonder if direct I/O to a file on a journalled filesystem would need that).

-- Jamie

#13 lore raw
Quoted 7 lines

This whole thread is asking a simple question: what shall we define "I/O write barrier" to mean? Does it force an ordering for reads after the barrier which overlap writes before the barrier, or not?

We are free to define the answer as "yes" or "no", according to whichever is more useful. Or even to define two kinds of barrier, if that would be useful.

There was a small branch of the thread aimed at clarifying what kind of ordering there is independent of barriers, which is crucial to deciding what additional ordering a barrier should impose. The answer to that subsidiary question appears to be "none" unless you count a side effect of alias handling (and you shouldn't).

This is, incidentally, nonobvious. I believe in most contexts, when people say "elevator algorithm," they're talking about something that affects the timing of a stream of disk I/O requests, but not the outcome; the outcome is expected to be the same as FIFO regardless of the scheduling. Barriers come into play only when you have timing dependencies between two sectors, e.g. when you don't want to wipe something out of the journal until _after_ it has been written someplace else. Jens points out that this ideal elevator isn't practical, or necessary, in Linux.

--
Bryan Henderson IBM Almaden Research Center
San Jose CA Filesystems

#14 lore raw
In reply to Jamie Lokier
Quoted 3 lines · Jamie Lokier

This whole thread is asking a simple question: what shall we define "I/O write barrier" to mean? Does it force an ordering for reads after the barrier which overlap writes before the barrier, or not?

It's always the simple questions that are the hardest to answer ;-)

So far, we seem to have the following rules (at least for "barrier-only" barriers. Special requests come with their own barriers, see below):

i) write requests may never cross a barrier that separates them from other write requests
ii) a read request R and a write request W may change their
order (with respect to each other), unless they overlap AND are separated by at least one barrier
iii) in all other cases, requests are free to move about

Rule ii) seems a little tricky. Is there actually a means for user space to send a barrier, e.g. when doing direct IO ? If not, the I think only user of ii) would be "direct IO" that comes from unbuffered file system meta-data and such.

Quoted 1 line

Or even to define two kinds of barrier, if that would be useful.

I can think of three distinct uses of barriers (but there may be more):

1) ensure integrity involving multiple requests
2) disentangle overlapping requests
3) make sure special requests (power management or such) don't wander off

2) may merit a distinction. E.g. an elevator that automatically puts overlapping requests in FIFO order (i.e. Bryan's "ideal" elevator) could ignore this kind of barriers. Barriers of type
3) restricts the move of anything.

Cheers, Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#15 lore raw
Quoted 11 lines · Werner Almesberger

i) write requests may never cross a barrier that separates them from other write requests
ii) a read request R and a write request W may change their
order (with respect to each other), unless they overlap AND are separated by at least one barrier
iii) in all other cases, requests are free to move about

Rule ii) seems a little tricky. Is there actually a means for user space to send a barrier, e.g. when doing direct IO ? If not, the I think only user of ii) would be "direct IO" that comes from unbuffered file system meta-data and such.

It should be possible to write a decent filesystem in userspace -- even if it's just for prototyping -- so barriers from userspace should be offered, eventually.

Note that unbuffered file system meta-data can theoretically overlap page cache, although it usually doesn't, and a filesystem could easily set a flag to say that it doesn't ever.

Think of the experimental modifications to ext3 to allow inodes to be allocated in a file. That means blocks are changing their meaning from being file blocks to inode blocks or vice versa -- and both I/Os could conceivably be in flight at the same time.

-- Jamie

#16 lore raw
Quoted 2 lines · Jamie Lokier

Think of the experimental modifications to ext3 to allow inodes to be allocated in a file.

Long time ago Kristian Köhntoppp did the for ext2 for his Diploma Thesis [1]

[1] http://kris.koehntopp.de/artikel/diplom/ (Warning: German) -
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#17 lore raw
In reply to Jamie Lokier
Quoted 3 lines · Jamie Lokier

It should be possible to write a decent filesystem in userspace -- even if it's just for prototyping -- so barriers from userspace should be offered, eventually.

Yes, I suppose also databases would want barriers. My question was more in the direction of "what might we break if we change some of the rules now ?".

Quoted 4 lines

Think of the experimental modifications to ext3 to allow inodes to be allocated in a file. That means blocks are changing their meaning from being file blocks to inode blocks or vice versa -- and both I/Os could conceivably be in flight at the same time.

Oh, that one's evil !

- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#18 lore raw
In reply to Jens Axboe
Quoted 3 lines · Jens Axboe

It can happen with direct io of any sort, the solution has to take this into account. That's why we currently have handling for rbtree aliases as well.

How well is this actually supposed to work ? When reading what as-iosched does, I was left with the impression that you could construct a set of partially overlapping requests that doesn't get sorted in FIFO order.

I haven't tried to feed as-iosched such a request mix, though, so maybe I'm wrong.

(For partially overlapping requests, it may actually be nice to be able to break them into multiple parts, and queue them separately. Particularly if they also come with distinct priorities.)

- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#19 lore raw
Quoted 4 lines · Werner Almesberger

(For partially overlapping requests, it may actually be nice to be able to break them into multiple parts, and queue them separately. Particularly if they also come with distinct priorities.)

If there's a read which depends on a prior write, doesn't it make more sense to just copy the data in memory for the parts which overlap?

If you do that, then you can service all high priority reads properly:
those that don't overlap can cross write barriers, and those that do overlap can be copied in memory immediately.

There may be a case for forcing a direct read for programs which check storage data integrity, although probably not even then is it useful. (A program that wants to write some data and then read using direct I/O will call write(), _wait_ until that returns after committing the data, and then call read()).

Even if the current behaviour of requiring a device read after the barrier must remain for ordinary direct I/O, it isn't required for requests marked as "high-priority I/O".

-- Jamie

#20 lore raw
Quoted 2 lines · Jamie Lokier

If there's a read which depends on a prior write, doesn't it make more sense to just copy the data in memory for the parts which overlap?

Probably. In this case, we'd have to fragment the read request into the part that's handled through this copy operation, and the 0-2 parts that need to come from disk.

- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#21 lore raw
In reply to Werner Almesberger
Quoted 9 lines · Werner Almesberger
Quoted 3 lines · Jens Axboe

It can happen with direct io of any sort, the solution has to take this into account. That's why we currently have handling for rbtree aliases as well.

How well is this actually supposed to work ? When reading what as-iosched does, I was left with the impression that you could construct a set of partially overlapping requests that doesn't get sorted in FIFO order.

Overlapping requests are only detected if they start at the same sector.

The mechanism is just there because of the data structure use, Linux has never made any effort to guard against this outside of the page cache context. If you issue direct io that overlaps, you are providing your own rope.

Quoted 7 lines

I haven't tried to feed as-iosched such a request mix, though, so maybe I'm wrong.

(For partially overlapping requests, it may actually be nice to be able to break them into multiple parts, and queue them separately. Particularly if they also come with distinct priorities.)

Bad idea, unless you have zero setup overhead for the hardware issued commands. Linux will also attempt to remerge these requests when it later discovers they are adjacent. You can block this by disallowing merging of request with different priorities, but I really don't see why you'd want to do that. It would be a net loss in the end anyways.

Signature · 1 line
Jens Axboe
#22 lore raw
Quoted 4 lines · Jens Axboe

Overlapping requests are only detected if they start at the same sector.

The mechanism is just there because of the data structure use, [...]

So even the special handling of requests that start with the same sector isn't required, and shouldn't be depended on, right ?

Quoted 5 lines

Bad idea, unless you have zero setup overhead for the hardware issued commands. Linux will also attempt to remerge these requests when it later discovers they are adjacent. You can block this by disallowing merging of request with different priorities, but I really don't see why you'd want to do that. It would be a net loss in the end anyways.

The issue is that you may get large requests, in the middle of which a single page gets a higher priority, e.g. because the large request comes from a low-priority copy operation, and there's a high-priority reader concurrently working on the same file.

In this case, the high-priority reader either has to wait for the whole low-priority request to crawl to the head of the queue (probably missing the deadline of the high-priority read), or we could take the request and raise its priority, giving our low-priority reader a nice boost. The latter isn't so bad if it happens every once in a while, but someone may figure out how to do this repeatedly, throwing off our bandwidth calculations.

- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#23 lore raw
Quoted 12 lines · Werner Almesberger
Quoted 5 lines

Bad idea, unless you have zero setup overhead for the hardware issued commands. Linux will also attempt to remerge these requests when it later discovers they are adjacent. You can block this by disallowing merging of request with different priorities, but I really don't see why you'd want to do that. It would be a net loss in the end anyways.

The issue is that you may get large requests, in the middle of which a single page gets a higher priority, e.g. because the large request comes from a low-priority copy operation, and there's a high-priority reader concurrently working on the same file.

Quoted 7 lines

In this case, the high-priority reader either has to wait for the whole low-priority request to crawl to the head of the queue (probably missing the deadline of the high-priority read), or we could take the request and raise its priority, giving our low-priority reader a nice boost. The latter isn't so bad if it happens every once in a while, but someone may figure out how to do this repeatedly, throwing off our bandwidth calculations.

That's fine for a device with fast data transfer and slow seek times. But for a device with slow data transfer (e.g. nbd to a remote disk), you'd want to split the request for sure.

-- Jamie

#24 lore raw
In reply to Werner Almesberger
Quoted 8 lines · Werner Almesberger
Quoted 4 lines · Jens Axboe

Overlapping requests are only detected if they start at the same sector.

The mechanism is just there because of the data structure use, [...]

So even the special handling of requests that start with the same sector isn't required, and shouldn't be depended on, right ?

Correct, it's just a side effect of the rbtree. 2.4 never tried to do anything about it.

Quoted 12 lines
Quoted 5 lines

Bad idea, unless you have zero setup overhead for the hardware issued commands. Linux will also attempt to remerge these requests when it later discovers they are adjacent. You can block this by disallowing merging of request with different priorities, but I really don't see why you'd want to do that. It would be a net loss in the end anyways.

The issue is that you may get large requests, in the middle of which a single page gets a higher priority, e.g. because the large request comes from a low-priority copy operation, and there's a high-priority reader concurrently working on the same file.

Quoted 8 lines

In this case, the high-priority reader either has to wait for the whole low-priority request to crawl to the head of the queue (probably missing the deadline of the high-priority read), or we could take the request and raise its priority, giving our low-priority reader a nice boost. The latter isn't so bad if it happens every once in a while, but someone may figure out how to do this repeatedly, throwing off our bandwidth calculations.

I see your point. Sounds like you have to be careful with request allocations once a single request suddenly needs 2 more request slots due to splitting (livelock country).

Signature · 1 line
Jens Axboe
#25 lore raw
In reply to Jamie Lokier
Quoted 2 lines · Jamie Lokier

1. A read _which doesn't overlap writes before the barrier_ should be ok before the barrier with no visible change.

Ah, that's an excellent point. Thanks !

- Werner

Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
#26 lore raw

Maybe I am missing something.

A read that does not overlap a write could be moved up, regardless of barriers.

A read that does overlap a write could be moved up to the write, but not before it, regardless of barriers.

Writes that overlap should be written in order! Or corrupt data!

Guy

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Werner Almesberger
Sent: Tuesday, June 22, 2004 2:46 PM
To: Jamie Lokier
Cc: Jens Axboe; [email protected]
Subject: Re: barriers vs. reads

Quoted 2 lines · Jamie Lokier

1. A read _which doesn't overlap writes before the barrier_ should be ok before the barrier with no visible change.

Ah, that's an excellent point. Thanks !

- Werner

Signature · 7 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://www.almesberger.net/____________________________________________/
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html