Re: [patch 4/9] Guest page hinting: volatile swap cache.



On Fri, 2006-09-01 at 17:37 +0200, Martin Schwidefsky wrote:
On Fri, 2006-09-01 at 08:04 -0700, Dave Hansen wrote:
+EXPORT_SYMBOL(find_get_page_nodiscard);
+
+#endif

Is it worth having another full copy of find_get_page()? What about a
"nodiscard" argument?

That is a hard call to make. I really tried hard to avoid adding any
overhead to a system running without the feature.

The overhead being the extra (potentially unused) argument to the
function? Plus, that the function isn't inlined and thus will be unable
to have its argument optimized away?

In the worse case, we're talking about the cost of saving and restoring
the contents of a single register to the stack. In other arches, we're
talking about the push of an immediate on the stack for the call.

Yeah, it is a hard call to make, especially if you're aiming for
zero-impact.

-- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Macros versus lists
    ... C is a stack based language, ... You are calling six functions with each instantiation of the macro, of which, two are so expensive that you could add a lot of stuff there and the performance of your application wouldn't really notice a thing. ... You can just aswell make code slower rather than faster with "inlining" too much, usually inlining is better when the workload of the function is smaller than the calling overhead. ... If the only way to achieve a good performance is to use goto's, global variables and other debatable constructs there is usually something gone horribly wrong. ...
    (comp.graphics.api.opengl)
  • Re: Memory used by the program
    ... I test on another special hardware which has almost no debug ... The stack size *available* depends on your hardware and how you ... the size of all auto variables for that function plus some overhead ... Linux tools (and the version you run *on Linux* will almost certainly ...
    (comp.lang.c)
  • Re: Any use for recursion?
    ... In modern languages there is no overhead. ... popped back off the stack, the program counter being changed again. ... Recursion is ubiquitous in modern software. ...
    (comp.programming)
  • Re: Memory used by the program
    ... I test on another special hardware which has almost no debug ... The stack size *available* depends on your hardware and how you ... the size of all auto variables for that function plus some overhead ... Linux tools (and the version you run *on Linux* will almost certainly ...
    (comp.lang.c)
  • Re: Mid-tournament confrontations?
    ... >confrontation with another player who has me covered by relatively a lot. ... Do you play better as a big stack? ... In a perfect world, chips have ... where I think a big stack may be worth more than two medium stacks. ...
    (rec.gambling.poker)