Open Source Computing

Week 13 (4/17, 4/19?)





The Early Days of Linux

As told by Lars Wirzenius, classmate of Linus.

Usenet played a role.

lwn.net/SubscriberLink/928581/841b747332791ac4

Red Hat

How did they manage to make so much money selling Linux? IBM bought the company for $34 billion in 2018.

See opencoreventures.com/blog/2023-04-red-hat-model-only-worked-red-hat.

Red Hat started when Linux was novel (March 1993; Linux didn't start until August 1991), and RH offered support. They supported all the weird "system-administration" stuff. At this point, that's easily found online and is often automated.

The OpenCoreVentures argument is that selling support collects pennies per dollar of added value (their term: "low rake"). VCs are not interested in that kind of business model.

In any event, it seems clear nobody today is going to be able to start selling Linux.


Linux kernel source

Brief overview of TCP

Start with af_inet.c::tcp_protocol() and tcp_ipv4.c::tcp_v4_rcv
    => __inet_lookup_skb => __inet_lookup()
    => tcp_v4_do_rcv
        =>     tcp_rcv_established() | tcp_v4_hnd_req(sk, skb) | tcp_child_process
        =>     tcp_input.c::tcp_rcv_state_process()
                    -> icsk->icsk_af_ops->conn_request(sk, skb)
        == tcp_v4_conn_request()        // see table at tcp_ipv4.c::line 1758

tcp_v4_hnd_req():
    inet_csk_search_req: this is looking for the "request socket", a mini-socket with additional info
    tcp_check_req: checks if there is space in the accept queue
    inet_lookup_established: we *did* just call this: same as __inet_lookup_established with hnum=dport
    main path: ends up returning sk

Caller is tcp_v4_do_rcv();
    caller falls through to tcp_rcv_state_process
        -> icsk->icsk_af_ops->conn_request(sk, skb)
        == tcp_v4_conn_request()        // see table at tcp_ipv4.c::line 1758

tcp_v4_conn_request():        // handles incoming SYN
    // error cases first
    tcp_clear_options();
    tcp_parse_options;
    tcp_openreq_init
    save saddr/daddr in ireq, which is a cast of req, which is a struct request_sock.

    saves req using inet_csk_reqsk_queue_hash_add(sk, req, TCP_TIMEOUT_INIT);    // csk = Connected SocKet
    see also inet_csk_search_req
    calls __tcp_v4_send_synack

tcp_input.c:
    int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)    // called by tcp_v4_do_rcv for states besides ESTABLISHED, LISTEN
    ESTABLISHED: tcp_data_queue()

Brief overview of HTB

htb_classify()

htb_dequeue()

    jiffies

    htb_dequeue_tree()