
Netflix's async sendfile now in FreeBSD-current - drewg123
https://lists.freebsd.org/pipermail/svn-src-head/2016-January/080924.html
======
drewg123
Slides from a presentation about async sendfile can be found at:
[http://www.slideshare.net/facepalmtarbz2/new-sendfile-in-
eng...](http://www.slideshare.net/facepalmtarbz2/new-sendfile-in-english)

~~~
vive-la-liberte
Slide 27/36, aka. slide 18/23, shows a type of graph which I have also seen in
the Google Chrome Dev Tools as well as a couple of other places. Someone told
me once the name of that kind graph but I've forgotten what it was. I've never
learned how to read that kind of graph. So, if someone would be so kind,
please tell me what it's called and how to read it.

~~~
revelation
They call it a flame graph and what you are seeing are call stacks. X axis is
time, Y axis is call stack depth.

The very bottom layer is the function you are analyzing, ever layer above is a
function called by the one directly below it.

~~~
jberryman
> X axis is time

That's not correct from what I'm reading.

~~~
revelation
If you are sampling the stack at equidistant points in time (or, sampling
theorem and all, _fast enough_ ) and then determine the width on the basis of
"seen in fraction of samples", that's pretty close to time. (time _span_ if
you want)

------
ihsw
I love how the commit day is the same as the last one -- January 6.

I'll be damned if C doesn't look like arcane magic to me, I can grok some/most
of it but fitting it all in my head would take a herculean effort.

Maybe it's system's programming but either way it makes my brain melt.

~~~
jrcii
Far be it from the power of my single, small protesting voice to change the
tide of a culture, but I wish we could discontinue the use of the word grok.
The sound is aesthetically offensive somehow, and yet adds nothing to the
synonyms: comprehend or understand.

Its proponents claim it implies a /complete/ understanding, so is more
specific. Yet "I understand" does not imply an incomplete understanding.
Furthermore the implication of completeness is a weak one, this is proven by
how quickly and easily even that small value is neutralized when, for example,
the parent said, "I can grok some/most of it." If we should take this to mean,
"I can completely and comprehensively understand some or most of it," is that
meaningful or truly the parent's intent? Even if it were, does it add to, "I
can understand some or most of it"?

I would speculate that the reason a word for "completely understand" hasn't
already made its way into the English lexicon after hundreds of years is
because it's unnecessary, and further that its use within the IT community is
motivated not so much by the desire for precision in communication as by a
desire to be perceived as a savvy member of the community.

~~~
derefr
There are few other things in the world that work like source code, where
"understanding" isn't something you do linearly, or even hierarchically, but
_graphically_ , by exploring the connections between elements.

To grok a program, or a programming language, basically refers to having a
graph of its elements and their interactions as a model in your head.
"Grokking some of X" doesn't mean that you have a patchy or "blurry" graph of
the whole thing; it means you have a complete graph of some subcomponents, but
not all.

To put it another way: "understanding" doesn't usually imply being able to
recreate the thing yourself. "Grokking" usually does. It's not an
understanding you can put into words; it's an intuitive ability to "feel" the
rules of the system because you've effectively mirrored the structure of the
system with the structure of your synapses.

The only other things you can "grok", I think, are spoken languages (though
there, we refer to "fluency"—another specialized kind of "understanding"), and
the rules of games and game-like things like the tax system.

Or: to grok is to experience the original designer's intent, such that you
could take over from the designer without the code changing in
tone/style/quality very much. One might say, for example, that Brandon
Sanderson has grokked the _Wheel of Time_ series, while Kevin J. Anderson
merely _understands_ the _Dune_ series. It's the difference between "seeing
what they did" and "seeing what they were going for."

~~~
digi_owl
I guess you could liken programming to Lego bricks.

When you have the programming language "groked" you do not see a loose pile of
bricks, but what you can create from whats in the pile.

~~~
derefr
Ah, that's not quite what I meant by grokking a programming language. The
"designer's intent" bit is important. When you grok a _language_ , that
doesn't (just) mean you now understand how to _use_ the language; it means you
now understand how to _extend_ the language, or _update_ the language, in a
way the original designers would have done themselves if they had continued
working on it.

To grok C and Unix, is to put yourself into a mindset where you would
naturally come up with Go and Plan 9; and where e.g. C++ would seem, in
comparison, ridiculous.

Grokking a thing doesn't mean you have to _agree_ with the mindset of its
designers; it just means you have to be capable of _wielding_ that mindset,
because it's the optimal mindset for understanding the thing itself.

The interesting thing about grokking a system is that you no longer _need_ to
attempt to "understand" the system piece-wise, because you can now _guess_
what the designer would have provided for the problem you're trying to solve,
and then just blindly "reach for it" without having to know it exists. There
are quite a few times I guessed the existence of a Unix utility without having
to be told about it, simply because it 'fit' the Unix philosophy to have a
program with that function exist.

Instead of the lego analogy, I might go with IKEA: build enough of their
furniture, and you don't have to read the manuals to put together new pieces
any more. When you survey the particular parts you got out of the box, you can
guess pretty accurately what the manual is going to say.

------
akkadmed
sendfile(1) was taken from Microsoft Windows.

