LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Kristian Høgsberg" <krh@redhat.com>
To: Greg KH <greg@kroah.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: Juju
Date: Fri, 26 Jan 2007 14:51:26 -0500 [thread overview]
Message-ID: <45BA5BBE.7060709@redhat.com> (raw)
In-Reply-To: <20070126064701.GA21892@kroah.com>
Greg KH wrote:
> On Thu, Jan 25, 2007 at 03:38:24PM -0800, Pete Zaitcev wrote:
>> On Thu, 25 Jan 2007 16:18:35 -0500, Kristian H??gsberg <krh@redhat.com> wrote:
>>
>>>> I see that ORBs are always allocated with a call (like SKB) and not
>>>> embedded into drivers (like URBs). It's great, keep it up. Also,
>>>> never allow drivers to pass DMA-mapped buffers into fw_send_request
>>>> and friends. We made both of these mistakes in USB, and it hurts.
>>> Oh, the ORBs are SBP-2 specific data structures, struct fw_transaction is
>>> probably what corresponds to USB URBs. This struct is defined in
>>> fw-transaction.h and is available for embedding into other structs, such as
>>> struct sbp2_orb in fw-sbp2. Is that what you're suggesting against, and what
>>> are the problems with this approach?
>> Fortunately we do not care about out-of-tree drivers, which are most
>> affected, you may even call it a feature ^_^. My main problem is,
>> we can't refcount URBs, so usbmon can't tap them and must copy.
>
> urbs are reference counted, it's just that not all drivers who create
> them use them that way :(
>
> Perhaps you can inforce this in the new codebase...
It's a small change to make the fw_transaction struct opaque and ref-counted,
and it's definitely still doable. But the nice thing about embedding the
struct is that you have one memory allocation failure path less to worry
about. And I haven't yet, and don't expect to see a use case that will need
ref-counted struct fw_transaction, the ownership is always clearly defined.
But I can go either way on this and if there is a good reason to ref count
them it's a pretty small change.
cheers,
Kristian
next prev parent reply other threads:[~2007-01-26 19:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-25 6:37 Juju Pete Zaitcev
2007-01-25 17:13 ` Juju Stefan Richter
2007-01-25 21:18 ` Juju Kristian Høgsberg
2007-01-25 23:38 ` Juju Pete Zaitcev
2007-01-26 2:35 ` Juju Stefan Richter
2007-01-26 4:01 ` Juju Kristian Høgsberg
2007-01-26 11:30 ` Juju Stefan Richter
2007-01-26 4:47 ` Juju Pete Zaitcev
2007-01-26 10:53 ` Juju Stefan Richter
2007-01-26 6:47 ` Juju Greg KH
2007-01-26 19:51 ` Kristian Høgsberg [this message]
2007-01-29 0:13 ` Juju Pete Zaitcev
2007-01-29 19:53 ` Juju Kristian Høgsberg
2007-01-29 20:22 ` Juju Pete Zaitcev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45BA5BBE.7060709@redhat.com \
--to=krh@redhat.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zaitcev@redhat.com \
--subject='Re: Juju' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).