login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
November
»
14
Re: [Pcihpd-discuss] [PATCH 2/5] Construct one fakephp slot per pci slot
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Alex Chiang
Subject:
Re: [Pcihpd-discuss] [PATCH 2/5] Construct one fakephp slot per pci slot
Date: Wednesday, November 14, 2007 - 8:01 am
Hi Eike, * Rolf Eike Beer <eike-hotplug@sf-tec.de>:
quoted text
> Am Mittwoch, 14. November 2007 schrieb Alex Chiang: > > * Rolf Eike Beer <eike-hotplug@sf-tec.de>: > > > > > > This is ugly. Please do it the way we already do e.g. for > > > acpiphp: add a char[8] to "struct dummy_slot" and just > > > reference that here. > > > > I took at look at the code in acpiphp you're talking about, > > and I'm not sure why you think the above is "ugly". We're > > talking about a runtime vs compile time storage for the name, > > and doing a kmalloc/sprintf is a pretty standard idiom. > > > > BTW, I did incorporate both Linas' and Willy's comments, by > > changing the kmalloc size to an explicit 32, and using > > snprintf instead. > > > > In any case, for your particular comment, I think I'm going > > to leave it alone for now, and let Greg weigh in with the > > final recommendation. > > Because we have another allocation of very small size for every > slot here. > > struct dummy_slot has a size of 4 pointers, that's 16 byte for > 32 bit architectures. Putting 8 byte of additional storage here > would save a complete allocation on 32 bit platforms. For 64 > bit platforms the memory usage is the same but we do less > allocations (i.e. less points to fail) and less memory > fragmentation. > > Btw: your code lacks a check if kmalloc() returns NULL.
Good points. I'll make your suggested change for v2. Thanks. /ac -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Mon Nov 12, 5:08 pm)
[PATCH 1/5] Remove path attribute from sgi_hotplug
, Alex Chiang
, (Mon Nov 12, 5:12 pm)
[PATCH 2/5] Construct one fakephp slot per pci slot
, Alex Chiang
, (Mon Nov 12, 5:13 pm)
[PATCH 3/5, RFC] Introduce pci_slot
, Alex Chiang
, (Mon Nov 12, 5:14 pm)
[PATCH 4/5, RFC] ACPI PCI slot detection driver
, Alex Chiang
, (Mon Nov 12, 5:17 pm)
[PATCH 5/5] Add pci_slot_add_hotplug() interface
, Alex Chiang
, (Mon Nov 12, 5:18 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 10:01 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Wilcox
, (Tue Nov 13, 11:33 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 11:51 am)
Re: [PATCH 2/5] Construct one fakephp slot per pci slot
, Linas Vepstas
, (Tue Nov 13, 12:48 pm)
Re: [PATCH 2/5] Construct one fakephp slot per pci slot
, Matthew Wilcox
, (Tue Nov 13, 12:52 pm)
Re: [PATCH 3/5, RFC] Introduce pci_slot
, Linas Vepstas
, (Tue Nov 13, 12:56 pm)
Re: [PATCH 3/5, RFC] Introduce pci_slot
, Matthew Wilcox
, (Tue Nov 13, 1:03 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Wilcox
, (Tue Nov 13, 1:11 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 1:19 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Tue Nov 13, 1:21 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Linas Vepstas
, (Tue Nov 13, 1:24 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 1:26 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Tue Nov 13, 1:36 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Tue Nov 13, 1:59 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matt Domsch
, (Tue Nov 13, 2:15 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 2:30 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Tue Nov 13, 2:31 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 2:32 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 2:36 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Linas Vepstas
, (Tue Nov 13, 2:41 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Wilcox
, (Tue Nov 13, 2:58 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Bjorn Helgaas
, (Tue Nov 13, 3:01 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 3:16 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Rick Jones
, (Tue Nov 13, 3:51 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 3:56 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Kristen Carlson Accardi
, (Tue Nov 13, 3:59 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Wilcox
, (Tue Nov 13, 4:04 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Tue Nov 13, 4:07 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Gary Hade
, (Tue Nov 13, 4:08 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Tue Nov 13, 4:14 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Kristen Carlson Accardi
, (Tue Nov 13, 4:33 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Wilcox
, (Tue Nov 13, 5:10 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Andi Kleen
, (Tue Nov 13, 6:07 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Tue Nov 13, 6:37 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Scott Murray
, (Tue Nov 13, 11:00 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Kenji Kaneshige
, (Wed Nov 14, 2:55 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Kenji Kaneshige
, (Wed Nov 14, 4:43 am)
Re: [Pcihpd-discuss] [PATCH 2/5] Construct one fakephp slo ...
, Rolf Eike Beer
, (Wed Nov 14, 5:39 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Wilcox
, (Wed Nov 14, 7:17 am)
Re: [Pcihpd-discuss] [PATCH 2/5] Construct one fakephp slo ...
, Alex Chiang
, (Wed Nov 14, 7:17 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Andi Kleen
, (Wed Nov 14, 7:35 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Wed Nov 14, 7:42 am)
Re: [Pcihpd-discuss] [PATCH 2/5] Construct one fakephp slo ...
, Rolf Eike Beer
, (Wed Nov 14, 7:49 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Wilcox
, (Wed Nov 14, 8:00 am)
Re: [Pcihpd-discuss] [PATCH 2/5] Construct one fakephp slo ...
, Alex Chiang
, (Wed Nov 14, 8:01 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Andi Kleen
, (Wed Nov 14, 8:08 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Wilcox
, (Wed Nov 14, 8:12 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Wed Nov 14, 8:20 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Bjorn Helgaas
, (Wed Nov 14, 10:37 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Garrett
, (Wed Nov 14, 10:44 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Wed Nov 14, 10:51 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Greg KH
, (Wed Nov 14, 10:53 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Matthew Garrett
, (Wed Nov 14, 11:03 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Gary Hade
, (Wed Nov 14, 11:13 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Wed Nov 14, 11:36 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Kristen Carlson Accardi
, (Wed Nov 14, 11:38 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Wed Nov 14, 12:53 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Wed Nov 14, 2:24 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Wed Nov 14, 2:42 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Gary Hade
, (Wed Nov 14, 5:40 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Thu Nov 15, 10:36 am)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Alex Chiang
, (Thu Nov 15, 1:20 pm)
Re: [PATCH 0/5][RFC] Physical PCI slot objects
, Gary Hade
, (Thu Nov 15, 4:38 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ingo Molnar
Re: [PATCH 0/3] v2 Make hierarchical RCU less IPI-happy and add more tracing
Jeremy Fitzhardinge
Re: Linux 2.6.28.10 and Linux 2.6.29.6 XEN Guest Support Broken x86_64 in BUILD
Nick Piggin
Re: [patch] CFS (Completely Fair Scheduler), v2
Gary Hade
Re: [PATCH 0/5][RFC] Physical PCI slot objects
Dave Johnson
Re: expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device?
linux-netdev
:
Arnd Bergmann
Re: 64-bit net_device_stats
Stephens, Allan
RE: [PATCH]: tipc: Fix oops on send prior to entering networked mode
frank.blaschka
[patch 3/5] [PATCH] qeth: support z/VM VSWITCH Port Isolation
Wu Fengguang
Re: [PATCH] dm9601: handle corrupt mac address
David Miller
Re: [PATCH net-2.6.24] Fix refcounting problem with netif_rx_reschedule()
git
:
Junio C Hamano
Re: [PATCH] [RFC] add Message-ID field to log on git-am operation
Junio C Hamano
Re: Handling large files with GIT
Karl
Re: [ANNOUNCE] pg - A patch porcelain for GIT
Josh Triplett
Re: [RFC][PATCH 00/10] Sparse: Git's "make check" target
Pierre Habouzit
Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.
git-commits-head
:
Linux Kernel Mailing List
MIPS: RBTX4939: Fix IOC pin-enable register updating
Linux Kernel Mailing List
regulator: update email address for Liam Girdwood
Linux Kernel Mailing List
[SCSI] ipr: add message to error table
Linux Kernel Mailing List
powerpc/32: Wire up the trampoline code for kdump
Linux Kernel Mailing List
USB: omap_udc: sync with OMAP tree
openbsd-misc
:
Josh Grosse
Re: error : pkg add phpMyAdmin
Brian Candler
Re: OBSD's perspective on SELinux
Jacob Meuser
Re: /dev/audio: Device busy
David Vasek
Re: Inexpensive, low power, "wall wart" computer
William Boshuck
Re: Richard Stallman...
Colocation donated by:
Syndicate