SEARCH  

NEWS

2010.10.06:11:36:28
Moto.wieszjak.pl - nowy wortal motoryzacyjny na rynku stawia na porady
Nowa witryna oferuje użytkownikom przegląd wiadomości z rynku motoryzacyjnego, testy aut nowych i używanych, liczne porady prawne i eksploatacyjne dla kierowców, moto-forum, niezbędnik oraz newsletter dla zmotoryzowanych.

 

messageID:579960007211
author:James Bottomley
title:Re PATCH 1 1 mm unify pmd free implemen
On Mon, 28 Jul 2008, James Bottomley wrote: Are you sure about this (the barrier)? Im sure. Try it. It perturbs the code quite a bit to have a function call in the thing, because it - clobbers all callee-clobbered registers. This means that all functions that _used_ to be leaf functions and needed no stack frame at all (because they were simple enough to use only the callee-clobbered registers) are suddenly now going to be significantly more costly. Ergo: you get more stack movement with save/restore crud. - it is a barrier wrt any variables that may be visible externally (perhaps because they had their address taken), so it forces a flush to memory for those. - if it has arguments and return values, it also ends up forcing a totally unnecessary argument setup (and all the fixed register crap that involves, which means that you lost almost all your register allocation freedom - not that you likely care, since most of your registers are dead _anyway_ around the function call) So empty functions calls are _deadly_ especially if the code was a leaf function before, and suddenly isnt any more. On the other hand, there are also many cases where function calls wont matter much at all. If you had other function calls around that same area, all the above issues essentially go away, since your registers are dead anyway, and the function obviously wasnt a leaf function before the new call. So it does depend quite a bit on the pattern of use. And yes, function argument setup can be a big part of it too. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at rel="nofollow" vger.kernel.org/majordomo-info.html vger.kernel.org/majordomo-info.html
Index