Re: [PATCH, v2] PCI: create function symlinks in /sys/bus/pci/slots/N/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 22, 2008 at 01:53:58PM -0600, Alex Chiang wrote:
> * Matthew Wilcox <matthew@xxxxxx>:
> > On Fri, Aug 22, 2008 at 10:20:49AM -0600, Alex Chiang wrote:
> > > This is a second attempt at creating some handy symlinks in
> > > /sys/bus/pci/ between slots and devices.
> > > 
> > > It addresses the following concerns from last time:
> > > 
> > > 	- does not create superfluous 'device' link
> > > 	- correctly adds and removes links after hotplug ops
> > > 	- adds a bunch of documentation ;)
> > > 
> > > It does not address Willy's concerns about not needing the
> > > functionN back-links.  I kinda thought they were useful, no one
> > > else seemed to express an opinion...
> > 
> > I was just explaining why I didn't create them when I did my version of
> > this patch.  I don't have an objection to adding them; they make logical
> > sense.  The only concern might be the additional memory usage.
> 
> Yes, agree about the memory usage, although I wonder what the
> actual overhead is.
> 
> Does anyone have numbers for how much it costs to create a new
> symlink? I could try and figure this out but it will take a few
> days (busy with other stuff).

Almost nothing.

sysfs creates these things on the fly as they are accessed, and if
memory pressure on the machine happens, they are freed up properly and
then created again if a user asks to see them in the tree.

So don't worry about memory issues when adding new files or symlinks in
sysfs, it just isn't a problem (we handle 20000 disks easily on low
memory 31bit s390 systems.)

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux