Announcement

Collapse
No announcement yet.

Six Features Not In The Mainline Linux 5.6 Kernel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by andreano View Post

    Please use your fantasy before contradicting people. It's rude.

    This one is an idiom: A writer thread posts the semaphor after writing (involving one of multiple mutexes); the reader blocks on the semaphor, and then locks each mutex in turn to find the newly written item, before it goes back to blocking on the semaphor.
    The problem is that blocking is really hard to do and not just anybody should even try. Almost everyone that try's is going to screw their codes performance. There might be at an absolute maximum maybe 100 people globally that can do it right. And that's exactly why it should be implemented in the kernel so that everyone has an interface that is known good.

    EDIT: Plus, you know, process management..... The other reason these futex modifications should be in kernel.... Just look at native game ports to linux as the perfect example of this problem with blocking that these kernel patches could have prevented if they existed at the time they were ported. No need to do broken blocking if known good blocking already exists....
    Last edited by duby229; 11 February 2020, 11:13 PM.

    Comment


    • #32
      Originally posted by duby229 View Post

      The problem is that blocking is really hard to do and not just anybody should even try. Almost everyone that try's is going to screw their codes performance. There might be at an absolute maximum maybe 100 people globally that can do it right. And that's exactly why it should be implemented in the kernel so that everyone has an interface that is known good..
      The proposed kernel interface will not be an interface for "everyone". If there ever will be an application-level interface, it will be in userspace, for example in glibc. The interface they want is for the do-it-yourself people who you think there are only 100 of.

      Originally posted by duby229 View Post
      EDIT: Plus, you know, process management..... The other reason these futex modifications should be in kernel.... Just look at native game ports to linux as the perfect example of this problem with blocking that these kernel patches could have prevented if they existed at the time they were ported. No need to do broken blocking if known good blocking already exists....
      I don't know why you are so sure that this solves a problem that doesn't already have valid solutions. I can't tell from your post, and I can't tell why the proposers think that, from the descriptions provided.

      Comment


      • #33
        Originally posted by indepe View Post

        The proposed kernel interface will not be an interface for "everyone". If there ever will be an application-level interface, it will be in userspace, for example in glibc. The interface they want is for the do-it-yourself people who you think there are only 100 of.

        I don't know why you are so sure that this solves a problem that doesn't already have valid solutions. I can't tell from your post, and I can't tell why the proposers think that, from the descriptions provided.
        I just don't think blocking should be done in userspace, almost nobody is good at it. Process management and memory management exists in kernel for a good reason and that reason -is- that almost nobody is good at blocking. And now we live in an age where processors can have dozens or even hundreds of cores, and even situations where cores and memory banks are not anywhere physically near each other. The bottom line is that blocking is hard and getting much harder.

        EDIT: Just let the process manager and memory manager do its thing, it's just about guaranteed the linux kernel can do process management better than you.
        Last edited by duby229; 12 February 2020, 01:33 AM.

        Comment


        • #34
          Originally posted by duby229 View Post

          I just don't think blocking should be done in userspace, almost nobody is good at it. Process management and memory management exists in kernel for a good reason and that reason -is- that almost nobody is good at blocking. And now we live in an age where processors can have dozens or even hundreds of cores, and even situations where cores and memory banks are not anywhere physically near each other. The bottom line is that blocking is hard and getting much harder.

          EDIT: Just let the process manager and memory manager do its thing, it's just about guaranteed the linux kernel can do process management better than you.
          Maybe it isn't clear what "userspace" refers to. When you use a mutex or a semaphore on Linux, chances are you are using an implementation that is for a significant part in userspace. That doesn't mean you are using something that was done by people who aren't good at it. In fact, "futex" is short for "fast userspace mutex". But actually it is just the basic building block that can be used to implement a fast mutex in userspace. In itself, it is not the kind of thing that you know as an application-level mutex. It is more like a very simple semaphore, without a counter or any value at all, except for the short moment wait is called. It can be used to implement a fast semaphore in userspace just as well. (But "fuphore" wouldn't sound as good. )

          If the userspace implementations internally use a futex, as they already do, the kind that already exists, then the "blocking" part is already done by the kernel. The proposed feature doesn't change that.

          Nobody is, or was, talking about implementing the "blocking" part, the one you are apparently concerned about, in userspace.

          Comment


          • #35
            Originally posted by indepe View Post

            Maybe it isn't clear what "userspace" refers to. When you use a mutex or a semaphore on Linux, chances are you are using an implementation that is for a significant part in userspace. That doesn't mean you are using something that was done by people who aren't good at it. In fact, "futex" is short for "fast userspace mutex". But actually it is just the basic building block that can be used to implement a fast mutex in userspace. In itself, it is not the kind of thing that you know as an application-level mutex. It is more like a very simple semaphore, without a counter or any value at all, except for the short moment wait is called. It can be used to implement a fast semaphore in userspace just as well. (But "fuphore" wouldn't sound as good. )

            If the userspace implementations internally use a futex, as they already do, the kind that already exists, then the "blocking" part is already done by the kernel. The proposed feature doesn't change that.

            Nobody is, or was, talking about implementing the "blocking" part, the one you are apparently concerned about, in userspace.
            But that's not how Windows works. Which is why I mentioned game ports and is exactly the problem these futex modifications in kernel will address. Windows doesn't actually have a real true process manager, it's much more like a glorified time slicer.... And it's this dilemma that these kernel patches can address so that game ports from windows don't -have- to worry about blocking in userspace.

            EDIT: This is -thee- reason why most game ports to linux perform slower than their windows counterparts.
            Last edited by duby229; 12 February 2020, 02:11 AM.

            Comment


            • #36
              Originally posted by duby229 View Post

              But that's not how Windows works. Which is why I mentioned game ports and is exactly the problem these futex modifications in kernel will address. Windows doesn't actually have a real true process manager, it's much more like a glorified time slicer.... And it's this dilemma that these kernel patches can address so that game ports from windows don't -have- to worry about blocking in userspace.
              I haven't seen the Windows implementations but I'd be sure that mutexes and semaphores, at least the fast versions if there are any, are also for a significant part implemented in userspace. The best I know that's a requirement for optimal performance. We maybe just don't know that because it's not open source. Or there, the word "userspace" is perhaps defined differently.

              Comment


              • #37
                Originally posted by indepe View Post

                I haven't seen the Windows implementations but I'd be sure that mutexes and semaphores, at least the fast versions if there are any, are also for a significant part implemented in userspace. The best I know that's a requirement for optimal performance. We maybe just don't know that because it's not open source. Or there, the word "userspace" is perhaps defined differently.
                Yes, it certainly is, Windows is a true microkernel. Basically everything is userspace.
                Last edited by duby229; 12 February 2020, 02:32 AM.

                Comment


                • #38
                  Originally posted by Danny3 View Post

                  I don't think it's nice hardware, but maybe it's not so common because it might be expensive.
                  This is a high-end motherboard where this adapter can be found:
                  Supports AMD AM4 Socket Ryzen™ 2000, 3000, 4000 G-Series, 5000 and 5000 G-Series Desktop Processors; Supports DDR4 3466+ (OC); 2 PCIe 3.0 x16, 1 PCIe 2.0 x16, 2 PCIe 2.0 x1; NVIDIA Quad SLI™, AMD Quad CrossFireX™; 7.1 CH HD Audio (Realtek ALC1220 Audio Codec), Supports Purity Sound™ 4 & DTS Connect; 8 SATA3, 1 Ultra M.2 (PCIe Gen3 x4 & SATA3), 1 M.2 (PCIe Gen2 x4); 3 USB 3.1 Gen2 (Rear Type A+C, Front Type-C), 10 USB 3.1 Gen1 (4 Front, 6 Rear); AQUANTIA / Marvell 10 Gigabit LAN, Intel Gigabit LAN, Intel 802.11ac + BT 4.2; ASRock Polychrome SYNC


                  I don't want to buy a $10 usb dongle to have another USB port occupied for this and have weak signal when motherboard with integrated wifi and external antennas exist.
                  High-end in computing, especially AMD let alone running linux, is niche. And wireless desktops/workstations... Well, just consider yourself lucky it works at all.

                  Comment


                  • #39
                    Originally posted by duby229 View Post

                    Yes, it certainly is, Windows is a true microkernel. Basically everything is userspace.
                    Upon re-reading your answers, I'm not sure anymore if this means that we agree that the "blocking" part should be in the kernel, and the non-blocking part in userspace.

                    Comment


                    • #40
                      Originally posted by indepe View Post

                      Upon re-reading your answers, I'm not sure anymore if this means that we agree that the "blocking" part should be in the kernel, and the non-blocking part in userspace.
                      Well, at minimum we need to agree that process management should never be done in userspace on linux. On windows you -have- to, but on linux definitely no. How windows time slices processes compared to how linux schedules processes are two very different concepts. It's the whole reason why game ports to linux perform worse than their windows counterparts. There needs to be a way to deal with it in kernel and that's exactly what these futex patches do.
                      Last edited by duby229; 13 February 2020, 10:33 PM.

                      Comment

                      Working...
                      X