Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
On Tue, Jan 14, 2014 at 1:51 PM, J. Bruce Fields wrote: > On Tue, Jan 14, 2014 at 01:26:26PM -0800, Andy Lutomirski wrote: >> [grr, gmail -- I didn't actually intend to send that.] >> >> On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski wrote: >> > On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz >>

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 01:26:26PM -0800, Andy Lutomirski wrote: > [grr, gmail -- I didn't actually intend to send that.] > > On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski wrote: > > On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz wrote: > >>> process 2 requests a write lock, gets

RE: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Frank Filz
> [grr, gmail -- I didn't actually intend to send that.] > > On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski > wrote: > > On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz > wrote: > >>> process 2 requests a write lock, gets -EDEADLK, unlocks and > >>> requests a new read lock. That

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 04:21:53PM -0500, Richard Hipp wrote: > SQLite uses only F_SETLK, never F_SETLKW. Doesn't that mean that SQLite > will work the same with or without deadlock detection? Doesn't deadlock > detection only come into play with F_SETLKW? That's correct. > > >> (Actually,

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
[grr, gmail -- I didn't actually intend to send that.] On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski wrote: > On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz wrote: >>> process 2 requests a write lock, gets -EDEADLK, unlocks and >>> requests a new read lock. That request succeeds

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 01:24:23PM -0800, Andy Lutomirski wrote: > On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz wrote: > >> On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: > >> > [cc: drh, who I suspect is responsible for the most widespread > >> > userspace software that uses

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
On Tue, Jan 14, 2014 at 1:21 PM, Richard Hipp wrote: > I have no context here. I'm not sure what you are discussing or what > questions you have or what SQLite has to do with any of it. Nevertheless, I > have injected a few remarks inline > The discussion is about a new set of fcntl

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 01:17:20PM -0800, Andy Lutomirski wrote: > On Tue, Jan 14, 2014 at 1:10 PM, J. Bruce Fields wrote: > > On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: > >> [cc: drh, who I suspect is responsible for the most widespread > >> userspace software that uses

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz wrote: >> On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: >> > [cc: drh, who I suspect is responsible for the most widespread >> > userspace software that uses this stuff] >> > >> > On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce Fields >>

RE: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Frank Filz
> On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: > > [cc: drh, who I suspect is responsible for the most widespread > > userspace software that uses this stuff] > > > > On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce Fields > wrote: > > > On Thu, Jan 09, 2014 at 04:58:59PM -0800,

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Jeff Layton
On Tue, 14 Jan 2014 16:10:09 -0500 "J. Bruce Fields" wrote: > On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: > > [cc: drh, who I suspect is responsible for the most widespread > > userspace software that uses this stuff] > > > > On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
On Tue, Jan 14, 2014 at 1:10 PM, J. Bruce Fields wrote: > On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: >> [cc: drh, who I suspect is responsible for the most widespread >> userspace software that uses this stuff] >> >> On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce Fields >>

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: > [cc: drh, who I suspect is responsible for the most widespread > userspace software that uses this stuff] > > On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce Fields > wrote: > > On Thu, Jan 09, 2014 at 04:58:59PM -0800, Andy

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
[cc: drh, who I suspect is responsible for the most widespread userspace software that uses this stuff] On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce Fields wrote: > On Thu, Jan 09, 2014 at 04:58:59PM -0800, Andy Lutomirski wrote: >> On Thu, Jan 9, 2014 at 4:49 PM, Jeff Layton wrote: >> > On Thu,

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Thu, Jan 09, 2014 at 04:58:59PM -0800, Andy Lutomirski wrote: > On Thu, Jan 9, 2014 at 4:49 PM, Jeff Layton wrote: > > On Thu, 09 Jan 2014 12:25:25 -0800 > > Andy Lutomirski wrote: > >> When I think of deadlocks caused by r/w locks (which these are), I think > >> of two kinds. First is what

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Thu, Jan 09, 2014 at 04:58:59PM -0800, Andy Lutomirski wrote: On Thu, Jan 9, 2014 at 4:49 PM, Jeff Layton jlay...@redhat.com wrote: On Thu, 09 Jan 2014 12:25:25 -0800 Andy Lutomirski l...@amacapital.net wrote: When I think of deadlocks caused by r/w locks (which these are), I think of

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
[cc: drh, who I suspect is responsible for the most widespread userspace software that uses this stuff] On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce Fields bfie...@fieldses.org wrote: On Thu, Jan 09, 2014 at 04:58:59PM -0800, Andy Lutomirski wrote: On Thu, Jan 9, 2014 at 4:49 PM, Jeff Layton

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: [cc: drh, who I suspect is responsible for the most widespread userspace software that uses this stuff] On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce Fields bfie...@fieldses.org wrote: On Thu, Jan 09, 2014 at 04:58:59PM -0800,

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
On Tue, Jan 14, 2014 at 1:10 PM, J. Bruce Fields bfie...@fieldses.org wrote: On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: [cc: drh, who I suspect is responsible for the most widespread userspace software that uses this stuff] On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Jeff Layton
On Tue, 14 Jan 2014 16:10:09 -0500 J. Bruce Fields bfie...@fieldses.org wrote: On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: [cc: drh, who I suspect is responsible for the most widespread userspace software that uses this stuff] On Tue, Jan 14, 2014 at 11:27 AM, J.

RE: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Frank Filz
On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: [cc: drh, who I suspect is responsible for the most widespread userspace software that uses this stuff] On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce Fields bfie...@fieldses.org wrote: On Thu, Jan 09, 2014 at 04:58:59PM

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz ffilz...@mindspring.com wrote: On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: [cc: drh, who I suspect is responsible for the most widespread userspace software that uses this stuff] On Tue, Jan 14, 2014 at 11:27 AM, J. Bruce

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 01:17:20PM -0800, Andy Lutomirski wrote: On Tue, Jan 14, 2014 at 1:10 PM, J. Bruce Fields bfie...@fieldses.org wrote: On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: [cc: drh, who I suspect is responsible for the most widespread userspace software

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
On Tue, Jan 14, 2014 at 1:21 PM, Richard Hipp d...@sqlite.org wrote: I have no context here. I'm not sure what you are discussing or what questions you have or what SQLite has to do with any of it. Nevertheless, I have injected a few remarks inline The discussion is about a new set of

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 01:24:23PM -0800, Andy Lutomirski wrote: On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz ffilz...@mindspring.com wrote: On Tue, Jan 14, 2014 at 12:29:17PM -0800, Andy Lutomirski wrote: [cc: drh, who I suspect is responsible for the most widespread userspace software

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
[grr, gmail -- I didn't actually intend to send that.] On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski l...@amacapital.net wrote: On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz ffilz...@mindspring.com wrote: process 2 requests a write lock, gets -EDEADLK, unlocks and requests a new

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 04:21:53PM -0500, Richard Hipp wrote: SQLite uses only F_SETLK, never F_SETLKW. Doesn't that mean that SQLite will work the same with or without deadlock detection? Doesn't deadlock detection only come into play with F_SETLKW? That's correct. (Actually, what

RE: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Frank Filz
[grr, gmail -- I didn't actually intend to send that.] On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski l...@amacapital.net wrote: On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz ffilz...@mindspring.com wrote: process 2 requests a write lock, gets -EDEADLK, unlocks and requests

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread J. Bruce Fields
On Tue, Jan 14, 2014 at 01:26:26PM -0800, Andy Lutomirski wrote: [grr, gmail -- I didn't actually intend to send that.] On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski l...@amacapital.net wrote: On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz ffilz...@mindspring.com wrote: process 2

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-14 Thread Andy Lutomirski
On Tue, Jan 14, 2014 at 1:51 PM, J. Bruce Fields bfie...@fieldses.org wrote: On Tue, Jan 14, 2014 at 01:26:26PM -0800, Andy Lutomirski wrote: [grr, gmail -- I didn't actually intend to send that.] On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski l...@amacapital.net wrote: On Tue, Jan 14,

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Andy Lutomirski
On Thu, Jan 9, 2014 at 4:49 PM, Jeff Layton wrote: > On Thu, 09 Jan 2014 12:25:25 -0800 > Andy Lutomirski wrote: > >> On 01/09/2014 06:19 AM, Jeff Layton wrote: >> > It's not really feasible to do deadlock detection with FL_FILE_PVT >> > locks since they aren't owned by a single task, per-se.

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Jeff Layton
On Thu, 09 Jan 2014 12:25:25 -0800 Andy Lutomirski wrote: > On 01/09/2014 06:19 AM, Jeff Layton wrote: > > It's not really feasible to do deadlock detection with FL_FILE_PVT > > locks since they aren't owned by a single task, per-se. Deadlock > > detection also tends to be rather expensive so

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Andy Lutomirski
On 01/09/2014 06:19 AM, Jeff Layton wrote: > It's not really feasible to do deadlock detection with FL_FILE_PVT > locks since they aren't owned by a single task, per-se. Deadlock > detection also tends to be rather expensive so just skip it for > these sorts of locks. I just looked at the

[PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Jeff Layton
It's not really feasible to do deadlock detection with FL_FILE_PVT locks since they aren't owned by a single task, per-se. Deadlock detection also tends to be rather expensive so just skip it for these sorts of locks. Signed-off-by: Jeff Layton --- fs/locks.c | 12 ++-- 1 file changed,

[PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Jeff Layton
It's not really feasible to do deadlock detection with FL_FILE_PVT locks since they aren't owned by a single task, per-se. Deadlock detection also tends to be rather expensive so just skip it for these sorts of locks. Signed-off-by: Jeff Layton jlay...@redhat.com --- fs/locks.c | 12 ++--

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Andy Lutomirski
On 01/09/2014 06:19 AM, Jeff Layton wrote: It's not really feasible to do deadlock detection with FL_FILE_PVT locks since they aren't owned by a single task, per-se. Deadlock detection also tends to be rather expensive so just skip it for these sorts of locks. I just looked at the existing

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Jeff Layton
On Thu, 09 Jan 2014 12:25:25 -0800 Andy Lutomirski l...@amacapital.net wrote: On 01/09/2014 06:19 AM, Jeff Layton wrote: It's not really feasible to do deadlock detection with FL_FILE_PVT locks since they aren't owned by a single task, per-se. Deadlock detection also tends to be rather

Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

2014-01-09 Thread Andy Lutomirski
On Thu, Jan 9, 2014 at 4:49 PM, Jeff Layton jlay...@redhat.com wrote: On Thu, 09 Jan 2014 12:25:25 -0800 Andy Lutomirski l...@amacapital.net wrote: On 01/09/2014 06:19 AM, Jeff Layton wrote: It's not really feasible to do deadlock detection with FL_FILE_PVT locks since they aren't owned by