All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Pete Zievers <pjz@att.net>
Cc: linux-pci@vger.kernel.org
Subject: Re: PCI rescan
Date: Fri, 1 Mar 2013 13:53:46 -0800	[thread overview]
Message-ID: <20130301215346.GA3103@kroah.com> (raw)
In-Reply-To: <5130BF39.60403@att.net>

On Fri, Mar 01, 2013 at 08:46:17AM -0600, Pete Zievers wrote:
>  Hi-
> 
> Right now I am using 64-bit Red Hat Fedora 16.  The kernel version
> is 3.1.0-7.fc16.x86_64.
> 
> I'm interested in an API that will achieve from within C-language
> code compiled using gcc what can be accomplished from the shell with
> the following invocation:
> 
> echo 1 > /sys/bus/pci/devices/<device designator>/remove
> echo 1 > /sys/bus/pci/rescan
> 
> I find that at the shell level the above works great for me but is
> slow.  I need it to work perhaps an order of magnitude faster for
> what I'm attempting.

PCI device removal and recanning is not a fast process, what is "slow"
about doing it in this manner?  All of the delay is in the kernel here,
not in your userspace code.

What is wrong with doing the above "writing of values" in C code?

confused,

greg k-h

      reply	other threads:[~2013-03-01 21:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 14:46 PCI rescan Pete Zievers
2013-03-01 21:53 ` Greg KH [this message]

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=20130301215346.GA3103@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=pjz@att.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.