mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] block/xen-blkback: Deinline put_free_pages, save 645 bytes
@ 2016-03-13 19:27 Denys Vlasenko
  2016-03-13 19:27 ` [PATCH] block/xen-blkback: Deinline shrink_free_pagepool, save 204 bytes Denys Vlasenko
  0 siblings, 1 reply; 2+ messages in thread
From: Denys Vlasenko @ 2016-03-13 19:27 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Roger Pau Monné
  Cc: Denys Vlasenko, xen-devel, linux-kernel

This function compiles to 170 bytes of machine code. 7 callsites.

This function has a spinlocked code section,
which is significantly more expensive than call/return overhead.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: xen-devel@lists.xenproject.org
CC: linux-kernel@vger.kernel.org
---
 drivers/block/xen-blkback/blkback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index 4809c15..86798b4 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -142,7 +142,7 @@ static inline int get_free_page(struct xen_blkif_ring *ring, struct page **page)
 	return 0;
 }
 
-static inline void put_free_pages(struct xen_blkif_ring *ring, struct page **page,
+static void put_free_pages(struct xen_blkif_ring *ring, struct page **page,
                                   int num)
 {
 	unsigned long flags;
-- 
2.5.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] block/xen-blkback: Deinline shrink_free_pagepool, save 204 bytes
  2016-03-13 19:27 [PATCH] block/xen-blkback: Deinline put_free_pages, save 645 bytes Denys Vlasenko
@ 2016-03-13 19:27 ` Denys Vlasenko
  0 siblings, 0 replies; 2+ messages in thread
From: Denys Vlasenko @ 2016-03-13 19:27 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Roger Pau Monné
  Cc: Denys Vlasenko, xen-devel, linux-kernel

This function compiles to 201 bytes of machine code. 2 callsites.

This function has a spinlocked code section,
which is significantly more expensive than call/return overhead.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
CC: xen-devel@lists.xenproject.org
CC: linux-kernel@vger.kernel.org
---
 drivers/block/xen-blkback/blkback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index 4809c15..5e3394c 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -155,7 +155,7 @@ static inline void put_free_pages(struct xen_blkif_ring *ring, struct page **pag
 	spin_unlock_irqrestore(&ring->free_pages_lock, flags);
 }
 
-static inline void shrink_free_pagepool(struct xen_blkif_ring *ring, int num)
+static void shrink_free_pagepool(struct xen_blkif_ring *ring, int num)
 {
 	/* Remove requested pages in batches of NUM_BATCH_FREE_PAGES */
 	struct page *page[NUM_BATCH_FREE_PAGES];
-- 
2.5.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-13 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-13 19:27 [PATCH] block/xen-blkback: Deinline put_free_pages, save 645 bytes Denys Vlasenko
2016-03-13 19:27 ` [PATCH] block/xen-blkback: Deinline shrink_free_pagepool, save 204 bytes Denys Vlasenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®