Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!



Ask Slashdot: Stop PulseAudio From Changing Sound Settings?

Mr Thinly Sliced Re:Pulseaudio is a synthom, It's not to blame. (286 comments)

> Which is what my OP is about, what you suggest we've been there, done that and failed. This is simple functionality that should be handled in kernel with a simple API presented to userspace.

I'd argue that in fact with OSS, we've been there and tried it and it (the Unix write() and ioctl way) fails. (Not to mention you have no idea what I'd advocate, I've just been trying to work out how you'd tackle some of the hard problems with realtime DSP, which you've avoiding answering).

I'll ask again - are you saying to put floating point mixing in the kernel, or fixed point mixing? There are performance and other reasons why floating point register store/restore is avoided in the kernel (in fact some drivers uses these registers as working space IIRC). If you're saying put fixed point mixing in the kernel - this either incurs a penalty in converting everything to that fixed point for mixing _within the realtime processing thread_ or you force every userspace application to output fixed point to the kernel sound API.

Low latency timing information and scheduling is a crap shoot with OSS. How do you know when the sound you are queueing with write() will actually get output? How do you schedule your user-space applications with enough priority that they aren't parked before they get to that critical write() call?

All modern audio APIs have moved away from ioctl and write() to a callback down stack from the interrupt for a reason.

Ignoring this is going _backwards_ from what Jack gives us today.

about a month ago

Ask Slashdot: Stop PulseAudio From Changing Sound Settings?

Mr Thinly Sliced Re:Pulseaudio is a synthom, It's not to blame. (286 comments)

> you can resample your lower-priority audio outside and feed it through a lock-free ringbuffer. This way the deadline constrained realtime audio has no penalty in practice.

So it seems we agree that running non audio graph canonical formats and rates within the real time processing callback is a silly idea, right?

Now - would you agree that nearly all pro-audio applications and plugins internally work in floating point?

If you are advocating for an in-kernel fixed point mixer for the hardware you will need to perform conversions to fixed point for any output. This seems an unnecessary burn of RT time given we can pass floating point to hardware and do any mixing of it in software with it all in floating point.

Also, I'll point it out again:

"if you're not using floating point you're ignoring the possibility for optimisations using SIMD/FMA instructions"

I'm having trouble understanding what it is you are proposing as a solution.

Are you asking for in kernel fixed point mixing? Out of kernel? Please let me know.

I've done a fair of audio programming too, and the positions of the Jack guys and Poettering are (mostly) understandable.

The bit I don't understand is why Pulseaudio wasn't a "relaxed" mode of Jack with the necessary hardware bits bolted on. Then again the Jack project can't agree to work on one codebase or list of functionality and Pulseaudio can't agree to actually do any low latency work (except they do low latency enough for gaming, sure).

about 2 months ago

Ask Slashdot: Stop PulseAudio From Changing Sound Settings?

Mr Thinly Sliced Re:Pulseaudio is a synthom, It's not to blame. (286 comments)

> Despite that most commercial hardware has for ages used fixed point math for this, and that even a simple spline interpolation would do fine for all cases since you are upsampling, most of the "audio gurus" of the linux audio development comunity of the time (like Paul Davis, Steve Harris, etc) convinced the kernel people that there would be a terrible quality loss and it was a bad idea to do this.

One of the problems of using varying sample formats and rates when producing low latency audio is you have now introduced format conversions and resampling inside the deadline constrained realtime audio producing routines.

In addition, if you're not using floating point you're ignoring the possibility for optimisations using SIMD/FMA instructions.

about 2 months ago

Elon Musk: We Must Put a Million People On Mars To Safeguard Humanity

Mr Thinly Sliced Creating a Mars magnetosphere (549 comments)

Mars does not have a molten iron core, and hence doesn't have the cool magnetic field that earth does.

Spouting some bullshit during my lunchtime - would it be possible to make the core molten and thus spin up a magnetosphere by creating an artificial moon?

I'm thinking keep firing asteroids into the necessary orbit until you've accrued enough mass.

Obviously not a "done this week" project just a curious thought experiment.

about 3 months ago

New "Crescent Bay" VR Headset Revealed and Demo'd At Oculus Connect

Mr Thinly Sliced Re:Slashdot Hate Machine (65 comments)

FYI - Since everyone started twatting and facebooking the newsgroups have come back to life.

The Eternal September has more or less ended - the newbies that can work out how to install a newsreader can't deal with the patience needed waiting for a reply.

I've moved my technical discussions over there and use reddit and other sites as news feeds.

I mean, why didn't slashdot have any news items on the Mill CPU architecture?

about 3 months ago

NVIDIAs 64-bit Tegra K1: The Ghost of Transmeta Rides Again, Out of Order

Mr Thinly Sliced Re:Sounds smart, but is it? (125 comments)

If you want to look into revolutionary design changes look into the Mill CPU architecture.

They've put their lecture series available on the web about their intended architecture - it's kinda a hybrid DSP / general purpose with some neat side steps of contemporary CPU architectures.

about 4 months ago

Ask Slashdot: Where Do You Get (or Share) News About Open Source Projects?

Mr Thinly Sliced Re:Slashdot (85 comments)

"Phoronix Forums. You will never find a more wretched hive of scum and villainy. We must be cautious."
- Obi-Wan Kenobi

about 5 months ago

Linux Needs Resource Management For Complex Workloads

Mr Thinly Sliced Re:complex application example (161 comments)

You're welcome - I hope you get it sorted out.

The only other thing I'd mention - you perhaps noticed I kept saying "threads like.." and "with regular threads" because it's basically introduced a number of single points of failure. Due to the lack of back channel or retransmission, things can go silently wrong without notice (network cable failure etc). In an ideal world you'd double up on some of that infrastructure and networking.

I know you need to get something up and running, but it's perhaps something to bear in mind for a later iteration.

about 5 months ago

Linux Needs Resource Management For Complex Workloads

Mr Thinly Sliced Re:complex application example (161 comments)

FWIW I agree vis-a-vis using UDP for a business critical thing. I'd want exemption from responsiblity for any missed packets purely due to the infrastructure in between.

about 5 months ago

Linux Needs Resource Management For Complex Workloads

Mr Thinly Sliced Re:complex application example (161 comments)

First - the problem with python is that because it's a VM you've got a whole lot of baggage in that process out of your control (mutexes, mallocs, stalls for housekeeping).

Basically you've got a strict timing guarantee dictated by the fact that you have incoming UDP packets you can't afford to drop.

As such, you need a process sat on that incoming socket that doesn't block and can't be interrupted.

The way you do that is to use a realtime kernel and dedicate a CPU using process affinity to a realtime receiver thread. Make sure that the only IRQ interrupt mapped to that CPU is the dedicated network card. (Note: I say realtime receiver thread, but in fact it's just a high priority callback down stack from the IRQ interrupt).

This realtime receiver thread should be a "complete" realtime thread - no malloc, no mutexes. Passing messages out of these realtime threads should be done via non-blocking ring buffers to high (regular) priority threads who are in charge of posting to something like zeromq.

Depending on your deadlines, you can make it fully non-blocking but you'll need to dedicate a CPU to spin lock checking that ring buffer for new messages. Second option is that you calculate your upper bound on ring buffer fill and poll it every now and then. You can use semaphores to signal between the threads but you'll need to make that other thread realtime too to avoid a possible priority inversion situation.

> how do you then ensure that the process receiving the incoming UDP messages is high enough priority to make sure that the packets are definitely, definitely received

As mentioned, dedicate a CPU mask everything else off from it and make the IRQ point to it.

> what support from the linux kernel is there to ensure that this happens

With a realtime thread the only other thing that could interrupt it would be another realtime priority thread - but you should make sure that situation doesn't occur.

> is there a system call which makes sure that data received on a UDP socket *guarantees* that the process receiving it is woken up as an absolute priority over and above all else

Yes, IRQ mapping to the dedicated CPU with a realtime receiver thread.

> the message queue destination has to have locking otherwise it will be corrupted. what happens if the message queue that you wish to send the UDP packet to is locked by a *lower* priority process

You might get away with having the realtime receiver thread do the zeromq message push (for example) but the "real" way to do this would be lock-free ring buffers and another thread being the consumer of that.

> what support in the linux kernel is there to get the lower priority process to have its priority temporarily increased until it lets go of the message queue on which the higher-priority task is critically dependent

You want to avoid this. Use lockfree structures for correctness - or you may discover that having the realtime receiver thread do the post is "good enough" for your message volumes.

> to the best of my knowledge the linux kernel has absolutely no support for these kinds of very important re-prioritisation requirements

No offense, but Linux has support for this kind of scenario, you're just a little confused about how you go about it. Priority inversion means you don't want to do it this way on _any_ operating system, not just Linux.

about 5 months ago

Linux Needs Resource Management For Complex Workloads

Mr Thinly Sliced Re:complex application example (161 comments)

> the first ones used threads, semaphores through python's multiprocessing.Pipe implementation.

I stopped reading when I came across this.

Honestly - why are people trying to do things that need guarantees with python?

The fact you have strict timing guarantees means you should be using a realtime kernel and realtime threads with a dedicated network card and dedicated processes on IRQs for that card.

Take the incoming messages from UDP and post them on a message bus should be step one so that you don't lose them.

about 5 months ago

Ask Slashdot: An Open Source PC Music Studio?

Mr Thinly Sliced Re:Never gonna happen, because of how OSS works. (299 comments)

> Why on earth would you want to mix your professionally sounding audio with every freaking app that goes "ding" or "boing" or "you've got mail"?

Because at it currently stands any application that attempts to output through pulseaudio will get blocked and possibly hang until you stop jackd.

Having to "stop" jackd and my audio mixing session just because I want to take a skype call is not acceptable in 2014.

about a year ago

Intel Dev: GTK's Biggest Problem, and What Qt Does Better

Mr Thinly Sliced Re:GTK is trash (282 comments)

I don't know if it still is - but IIRC VMWare's Linux client was GTK based.

I haven't seen any others though tbh - but I don't use a lot of commercial software on Linux.

about a year ago

X.Org Server 1.15 Brings DRI3, Lacks XWayland Support

Mr Thinly Sliced Re:How well does XWayland work? (340 comments)

Yes. I've hacked aroud(sic) in xlib a lot.

Splendid - then I won't need to copy-paste some of the problems regarding right click menus locking the server and similar issues documented elsewhere - right? The X developers that have moved over to developing Wayland have explained these issues far better than I can.

Would you be kind enough to acknowledge these problems exist?

I get the feeling that people have invested so much energy and effort in X that they're reluctant to acknowledge the problems even exist. It's like some kind of programming Stockholm Syndrome.

I started recording live TV on a Linux box in 2003. I never had problems. What were you trying to make?

A simple application capturing part of the desktop plus a live video feed with V4L and synchronised audio capture.

I started with just trying to capture the desktop + audio. Using either direct ALSA, pulseaudio or jack I would get scheduling issues and dropped X11 frames and/or audio underflow sometimes skipping multiple screen capture frames at once. Once I saw the problems programmatically I tried using the raw ffmpeg binary which exhibited the exact same issues either under a regular or realtime kernel. I did try with a recent compiled version, too.

We are getting way off topic with this discussion however. I feel my original premise (OSX is not behind X in terms of functionality or libraries) still stands.

about a year ago

X.Org Server 1.15 Brings DRI3, Lacks XWayland Support

Mr Thinly Sliced Re:How well does XWayland work? (340 comments)

> You know none of that stuff is in wayland either?

Yep, I was replying to GPs assertion that OSX has to catch up to X11.

> Also what's wrong with X event handling? You can select() on the events just like any others.

Have you ever written a real X protocol application or used one? Xedit, for example. The code is a mess of anachronisms (events targeted to sub-windows - if you are using them - modern toolkits don't now, excessively verbose error handling due to the historical cruft in the protocol etc) that haven't been brought into the 20th century due to the backwards compatibility needed.

Now you can say "yes, but these days everyone uses toolkit ##" - and you'd be correct, and you'd be using the toolkits abstraction on top of the X protocol and events. It gets messier when you want to add a sub-window with a GL or YUV surface. Now you're dealing with X, Toolkit ##, XGL and GL.

> Also, I've touched on OSX video handling. This is not a high point of OSX. Decoding a video and getting at the pixels is far, far better under ffmpeg than OSX.

Back when I moved onto OSX it took me about three days to get a custom screen + audio capture program up and running (with live preview) - something I was unable to getting working under X/ffmpeg and ALSA/pulseaudio without frame drops and synchronisation problems after many days of going grey. Feel free to blame it on my programming skill - but I found Apple's documented examples far easier to use as a base. Even using the ffmpeg binary alone with X11 capture and alsa/jack had frame drops and stalls in capture.

Perhaps this is a case of "better the library you know"? For me the OSX video handling is great and simple to use. Were you using the Objective-C bindings or talking C?

about a year ago

X.Org Server 1.15 Brings DRI3, Lacks XWayland Support

Mr Thinly Sliced Re:In a country far away and long ago.... (340 comments)

Friends, Country Men (and Women)!

This propaganda is exactly that which the Royalists would have you believe - without telling the complete story of waste and unsightliness they would foist upon us once again should we believe their lies!

Our royalist friend has failed to mention that under the Kings rule, some houses would remain half painted for a full day! It was due to the King having only limited time with which to grant delegation powers to the Minister of Composition who was powerless to get painting done without the Kings intervention.

Perhaps our royalist friend would also like to explain the excessive bureaucracy surrounding simple requests like even paint colors? Every simple request had to pass the Kings desk.

I for one would also like an explanation for the massive expense of maintaining a whole legion of Royally Approved color choosers that could only choose baroque antique color schemes that nobody wanted or commissioned.

No my Friends, the Royalists have but one agenda - to return us to the times of half painted houses and top heavy bureaucracy that punctuated our time as a Monarchy.

about a year ago

X.Org Server 1.15 Brings DRI3, Lacks XWayland Support

Mr Thinly Sliced Re:How well does XWayland work? (340 comments)

> Having seen terrible X compatibility layers for Mac OS X and Windows

The OSX X (XQuartz) implementation _is_ xorg-server (currently 1.14.4) - you know, the one used on Linux (with certain OSX specific tweaks to allow non-root mode)

The problems you mention with interoperability are largely down to the core windowing systems being vastly different models. We can argue about which model is correct but the interoperability problems are a side effect of different models - not evidence of a particular model being bad.

I'm not convinced from your descriptions here you quite understand the complexity of the interactions.

> The lack of X has been the main technical drawback Mac OS X has been
> having compared to Linux.
> I'd much rather see Mac OS X catch up with Linux than for Linux to go down
> to the level of Mac OS X.

OSX has vsync based updates, sensible event handling and lots of core library stuff (like the AVFramework) that makes it a pleasure to program compared to XWindows.

The Linux desktop _needs_ to get off X. It's an outdated behemoth with a model that is way out of date. Now you could say "well let's update the model then".

Sure, you can do that. And when you do that, you get Wayland.

about a year ago

YouTube Adds Play Icon To Page Titles To Show Which Tabs Are Making Noise

Mr Thinly Sliced Re:Belong in the browser, maybe? (150 comments)

Re:Belong in the browser, maybe?

If the Redhat guys have taught me anything it's that it belongs in systemd.

about a year ago

Using Java In Low Latency Environments

Mr Thinly Sliced Re:C++ can operate at the very limits (371 comments)

Pfft. I prototype in Java 7, then implement the real thing in C++.

I notice you haven't actually refuted any of my points, by the way. Go away, troll.

about a year ago


Mr Thinly Sliced hasn't submitted any stories.



Early Career Laughs

Mr Thinly Sliced Mr Thinly Sliced writes  |  about 8 years ago

Copied from a reply I made to Luke727 which brought back some memories:

Back early in my career, I worked for the first ISP in the UK (UKOnline), and myself and a good friend were charged with coming up with the 'first password' routine for the service.

Now Joe being Joe, decided the best way would be to use a dictionary, and then provide, if you will, an anti-dictionary - a dictionary full of swear words.

We would take two words based on this algorithm, and separate them with a dot.

Joe sent an email around the offices asking everyone to send back an email with all the swear words they knew, so that we could use it as the anti-dictionary, and filter the real dictionary based on it.

You wouldn't believe some of the mails that Joe received - some really dirty ones from people you wouldn't expect, either.

Anyways, the system was setup and sure enough, if a word was found in the dirty dictionary, it wasn't used as one of the pieces of the password.

Sure enough, three weeks after going live, customer support received a really annoyed and offended call from a female customer who had received:


I shit you not.

Slashdot Login

Need an Account?

Forgot your password?