Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

freebsd-scsi Digest, Vol 360, Issue 4

0 views
Skip to first unread message

freebsd-sc...@freebsd.org

unread,
Mar 21, 2010, 8:00:27 AM3/21/10
to freebs...@freebsd.org
Send freebsd-scsi mailing list submissions to
freebs...@freebsd.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
or, via email, send a message with subject or body 'help' to
freebsd-sc...@freebsd.org

You can reach the person managing the list at
freebsd-s...@freebsd.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of freebsd-scsi digest..."


Today's Topics:

1. Re: How is supposed to be protected the units list? (Attilio Rao)
2. Re: How is supposed to be protected the units list?
(Alexander Motin)


----------------------------------------------------------------------

Message: 1
Date: Sat, 20 Mar 2010 13:23:49 +0100
From: Attilio Rao <att...@freebsd.org>
Subject: Re: How is supposed to be protected the units list?
To: Alexander Motin <m...@freebsd.org>
Cc: freebs...@freebsd.org, "Justin T. Gibbs" <gi...@freebsd.org>,
m...@feral.com, Ed Maste <ema...@sandvine.com>
Message-ID:
<3bbf2fe11003200523t60...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

2010/3/12 Alexander Motin <m...@freebsd.org>:
> Attilio Rao wrote:
>> 2010/3/5 Attilio Rao <att...@freebsd.org>:
>>> 2010/3/4 Matthew Jacob <m...@feral.com>:
>>>> The referred to patch at least got me out of panic case :-)..
>>>>
>>>> http://people.freebsd.org/~mjacob/scsi_da.c.patch
>>> Yes, honestly the main intent of this patch is to offer a stable
>>> ground for correct handling of periph. When looking about refcounting
>>> them correctly, the main problem is that there was no initial
>>> condition assuring safety, and the initial patch should address this,
>>> but I'm sure there are places where periph refcount is not handled
>>> correctly and this may be one.
>>
>> So, as long as it seems nobody had a strong argument against this
>> patch, what do you think about me committing it?
>> We can further refine later if we think it is the case.
>>
>> Also, I think that Matt's patch should be committed just after this
>> one (and possibly we should investigate a similar add-on for the ata
>> counterpart too?).
>
> I have already told my opinion, that second lock may be not needed. I
> would like to think a bit more about both patches after getting back
> from the conference. Thanks,

So I made this new patch using the bus lock:
http://www.freebsd.org/~attilio/Sandvine/pdrv/xpt_lock.diff

I would have preferred to have a dedicated lock for the units lists,
but as long as you seem having strong opionion, I'm fine with it.
Maybe Matt wants to add his refcounting modifies using this scheme if
we came to a consensous?

Thanks,
Attilio

--
Peace can only be achieved by understanding - A. Einstein


------------------------------

Message: 2
Date: Sun, 21 Mar 2010 09:14:14 +0200
From: Alexander Motin <m...@FreeBSD.org>
Subject: Re: How is supposed to be protected the units list?
To: Attilio Rao <att...@freebsd.org>
Cc: freebs...@freebsd.org, "Justin T. Gibbs" <gi...@freebsd.org>,
m...@feral.com, Ed Maste <ema...@sandvine.com>
Message-ID: <4BA5C746...@FreeBSD.org>
Content-Type: text/plain; charset=UTF-8

Attilio Rao wrote:
> So I made this new patch using the bus lock:
> http://www.freebsd.org/~attilio/Sandvine/pdrv/xpt_lock.diff

OK. I've looked on both and I think both have race window between unit
number allocation and insertion into the list. I've changed last patch
to not drop the lock in meantime. What do you think about this:
http://people.freebsd.org/~mav/unit_lock.patch
?

Part about scsi_da.c I don't like in both cases, as I am not sure that
locks can't be recursed there in case of some errors. I don't see how
adding second lock could solve it.

> I would have preferred to have a dedicated lock for the units lists,
> but as long as you seem having strong opionion, I'm fine with it.

I haven't told it is strong. I have asked some time to check it. Now
comparing the patches I don't see benefits from having second lock. I
would say you just changing possible lock recursions to possible LORs.
It's not much better.

--
Alexander Motin


------------------------------

End of freebsd-scsi Digest, Vol 360, Issue 4
********************************************

0 new messages