Page MenuHomeFreeBSD

christos (Christos Margiolis)
User

Projects

User Details

User Since
Jul 2 2021, 4:03 PM (232 w, 3 d)

Recent Activity

Yesterday

christos added a comment to D54164: Makefile.inc1: Skip pkgbase installkernel check with INSTKERNNAME.
In D54164#1239214, @ivy wrote:

but this suggests it's safe to use make installkernel if you're using INSTKERNNAME, which isn't true. it may be true, but it also may be safe to use it without INSTKERNNAME set at all - it depends on what you set it to and what pkgbase kernels you have installed.

i would rather add a variable to disable this check (other than DESTDIR), like DISABLE_INSTALLKERNEL_PKG_CHECK, which people could put in /etc/make.conf if they're sure they understand the implications of doing this. alternatively, perhaps we could check if /boot/${INSTKERNNAME} was installed by pkg.

Mon, Dec 15, 5:41 PM
christos added a comment to D54130: sound: Unlock around uiomove() in midi_{read,write}().

I'm not convinced we have to unlock here, but this may give a breathe to the interrupt, so why not (during my last test I found too much latency but I don't know yet if it is relative to my userspace code or not).

Mon, Dec 15, 4:22 PM
christos added a comment to D54130: sound: Unlock around uiomove() in midi_{read,write}().

Still not sure this is good. It is working as-it for me; uiomove will not sleep if the lock is taken just above!

Mon, Dec 15, 3:24 PM
christos added a comment to D54129: sound: Retire snd_midi->qlock.

For the midi module, I think the right path is:

midi_unload -> midi_uninit -> mpu401_uninit (MPU_UNINIT) then midi_destroy.

mpu401_uninit should only do the hardware uninit, that is, send the MPU reset command.

Mon, Dec 15, 3:07 PM
christos added inline comments to D54130: sound: Unlock around uiomove() in midi_{read,write}().
Mon, Dec 15, 3:01 PM
christos added a comment to D54126: sound: Retire midi_devs and mstat_lock.

Well, I tried to create a bugzilla account last week, but could not manage to get a password!

Mon, Dec 15, 2:55 PM
christos added a comment to D54129: sound: Retire snd_midi->qlock.

To fix the termination problem I mentioned above, I think you can simply remove the midi_uninit call in mpu401_uninit (if you want to keep this as a module).

Mon, Dec 15, 2:47 PM
christos added a comment to D54126: sound: Retire midi_devs and mstat_lock.

Sorry, I can apply diff 54125 but no 54126 over it ?

Mon, Dec 15, 2:42 PM
christos added a reviewer for D54127: snd_dummy: Initial MIDI support: dev_nicolas-provost.fr.
Mon, Dec 15, 2:01 PM
christos added a comment to D54127: snd_dummy: Initial MIDI support.

Bump.

Mon, Dec 15, 2:00 PM
christos abandoned D54233: sound: Do not lock in midi_init().

Will combine with other patch.

Mon, Dec 15, 1:57 PM
christos requested review of D54233: sound: Do not lock in midi_init().
Mon, Dec 15, 1:55 PM
christos added a comment to D54102: snd_uaudio: Do not use pcm_channel->lock to protect uaudio_chan.

What problem does this fix?

From the commit referenced in "Fixes" (5cc34a83e1):

It turns out that snd_uaudio(4) uses sound(4)'s channel lock for its USB
transfer callbacks. I will try to address this at some point, because
this is layering violation, but for now we need to revert the commit, as
it causes a lock recursion panic with USB audio devices.

Mon, Dec 15, 1:42 PM
christos accepted D54164: Makefile.inc1: Skip pkgbase installkernel check with INSTKERNNAME.
Mon, Dec 15, 1:39 PM
christos committed rG164d03e30812: sound examples: Check if setting property was successful (authored by meka_tilda.center).
sound examples: Check if setting property was successful
Mon, Dec 15, 1:31 PM
christos committed rG6043e26b902b: sndctl(8): Do not free and re-open device (authored by christos).
sndctl(8): Do not free and re-open device
Mon, Dec 15, 1:30 PM

Fri, Dec 12

christos added a comment to D54126: sound: Retire midi_devs and mstat_lock.

@dev_nicolas-provost.fr can you test again now? Are channel numbers allocated properly?

Fri, Dec 12, 4:09 PM
christos updated the diff for D54192: sound: Merge midi_destroy() with midi_uninit().

Reflect changes in D54126.

Fri, Dec 12, 4:08 PM
christos updated the diff for D54126: sound: Retire midi_devs and mstat_lock.

Do what I said in my last comment and allocate a unique channel number with
unr(9) as well.

Fri, Dec 12, 4:06 PM
christos added a comment to D54125: sound: Stop building midi as a module.

I don't think it's worth the effort, presumably you plan to commit everything together? Mine was more of a general comment.

Fri, Dec 12, 3:36 PM
christos added a comment to D48763: kernel: Add `%pV` to kernel's printf format string.
In D48763#1237792, @bz wrote:

What about this with regards to the drm-kmod upgrade to 6.10?

This is generally interesting but not relevant for any wifi or graphics updates.

Fri, Dec 12, 3:34 PM
christos added a comment to D54125: sound: Stop building midi as a module.

But now unload errors can't be reported.

They will be reported by the driver or sound(4). This here functions essentially like pcm/sndstat.c, we just offer some functions to the drivers, this is not supposed to be a separate module, at least at this state.

Are you saying that the EBUSY case in midi_sysuninit() can't happen? If so, it should be an assertion, if not then the change looks wrong since we are leaking objects in midi_devs.

I eventually remove this in D54126, I just didn't want to make this a single patch because D54126 includes other changes which are not really related to this one.

Ok, please consider though that patches should be self-contained. This patch introduces a bug and the next one fixes it. It would be better to just combine them.

Fri, Dec 12, 3:28 PM
christos added a comment to D54126: sound: Retire midi_devs and mstat_lock.

Don't forget that some cards, as my common Soundblaster, have two ports; they actually appear as /dev/midi0.0 and /dev/midi0.1, which is useful to know that they belong to the same card.

Using more than one card could make difficult to find which port is tied to which card (although the devices discovery may be always done in the same order ?).

Fri, Dec 12, 3:26 PM
christos requested review of D54192: sound: Merge midi_destroy() with midi_uninit().
Fri, Dec 12, 3:21 PM
christos added a comment to D54125: sound: Stop building midi as a module.

But now unload errors can't be reported.

They will be reported by the driver or sound(4). This here functions essentially like pcm/sndstat.c, we just offer some functions to the drivers, this is not supposed to be a separate module, at least at this state.

Are you saying that the EBUSY case in midi_sysuninit() can't happen? If so, it should be an assertion, if not then the change looks wrong since we are leaking objects in midi_devs.

Fri, Dec 12, 3:16 PM

Thu, Dec 11

christos updated the diff for D54174: sound: Do not check for NULL before free().

Address Mark's comments.

Thu, Dec 11, 2:11 PM
christos accepted D51558: linuxkpi: Avoid trailing whitespaces in lkpi_hex_dump().
Thu, Dec 11, 12:12 PM
christos added a comment to D48763: kernel: Add `%pV` to kernel's printf format string.

What about this with regards to the drm-kmod upgrade to 6.10?

Thu, Dec 11, 12:09 PM
christos added a comment to D54129: sound: Retire snd_midi->qlock.

You can compare the body of my midi.c/midi_read function with yours. What is difficult with this file is that there is a lot of small changes to do everywhere.

I'll test my mods using some MIDI software I'm also working on. Then, if I do not see some bug anymore, I'll try to integrate these changes over yours.

Thu, Dec 11, 11:37 AM
christos added inline comments to D54130: sound: Unlock around uiomove() in midi_{read,write}().
Thu, Dec 11, 11:29 AM
christos added a comment to D54129: sound: Retire snd_midi->qlock.

So if you apply this patch to a clean branch, the panic goes away, right? At least that's the behavior on my system.

Thu, Dec 11, 11:23 AM
christos requested review of D54174: sound: Do not check for NULL before free().
Thu, Dec 11, 11:17 AM
christos updated the diff for D54140: sound: Move sndstat out of pcm/.

Address Mark's comment.

Thu, Dec 11, 10:54 AM
christos added a comment to D54129: sound: Retire snd_midi->qlock.

Do you trigger this panic with this patch? I cannot reproduce it in blocking mode. Are you talking about the current state of the code?

Thu, Dec 11, 10:52 AM
christos added a comment to D54129: sound: Retire snd_midi->qlock.

Currently, opening the midi device in blocking mode triggers a kernel panic (line 442), but opening with O_NONBLOCK works well. Furthermore I think the data queues do not work properly (midiq.h).

To fix this and some other problems, I'm currently rewriting small parts of this file.

Thu, Dec 11, 9:44 AM

Wed, Dec 10

christos abandoned D54135: sound: Do not free snd_midi->{in,out}q unconditionally in midi_uninit().
Wed, Dec 10, 2:39 PM
christos accepted D50853: linuxkpi: Add eventfd_*().
Wed, Dec 10, 2:17 PM
christos added a reviewer for D50848: eventfd: Rename `struct eventfd` to `struct eventfd_ctx`: christos.
Wed, Dec 10, 2:07 PM
christos added a comment to D50848: eventfd: Rename `struct eventfd` to `struct eventfd_ctx`.

Linux defines eventfd_ctx as:

struct eventfd_ctx {
	struct kref kref;
	wait_queue_head_t wqh;
	/*
	 * Every time that a write(2) is performed on an eventfd, the
	 * value of the __u64 being written is added to "count" and a
	 * wakeup is performed on "wqh". If EFD_SEMAPHORE flag was not
	 * specified, a read(2) will return the "count" value to userspace,
	 * and will reset "count" to zero. The kernel side eventfd_signal()
	 * also, adds to the "count" counter and issue a wakeup.
	 */
	__u64 count;
	unsigned int flags;
	int id;
};

This is quite different from our version. Although ugly, wouldn't it be safer to either explicitly alias it in LinuxKPI or even translate it there?

Wed, Dec 10, 2:06 PM

Mon, Dec 8

christos updated the summary of D54126: sound: Retire midi_devs and mstat_lock.
Mon, Dec 8, 6:47 PM
christos requested review of D54141: sound: Take device type into account in sndstat.
Mon, Dec 8, 6:40 PM
christos requested review of D54140: sound: Move sndstat out of pcm/.
Mon, Dec 8, 6:20 PM
christos updated the diff for D54135: sound: Do not free snd_midi->{in,out}q unconditionally in midi_uninit().

Abandoned D54134. Update.

Mon, Dec 8, 5:55 PM
christos abandoned D54134: sound: Retire M_MIDI and use M_DEVBUF.
Mon, Dec 8, 5:54 PM
christos requested review of D54135: sound: Do not free snd_midi->{in,out}q unconditionally in midi_uninit().
Mon, Dec 8, 5:53 PM
christos requested review of D54134: sound: Retire M_MIDI and use M_DEVBUF.
Mon, Dec 8, 5:50 PM
christos committed rGebe7b241662b: sound examples: Check if setting property was successful (authored by meka_tilda.center).
sound examples: Check if setting property was successful
Mon, Dec 8, 5:22 PM
christos closed D54038: sound examples: Check if setting property was successful.
Mon, Dec 8, 5:21 PM
christos accepted D54038: sound examples: Check if setting property was successful.

LGTM. Please take a look at the inline comments.

Mon, Dec 8, 5:18 PM
christos requested review of D54131: sound: Improve snd_midi->{in,out}q allocation.
Mon, Dec 8, 5:13 PM
christos requested review of D54130: sound: Unlock around uiomove() in midi_{read,write}().
Mon, Dec 8, 4:03 PM
christos requested review of D54129: sound: Retire snd_midi->qlock.
Mon, Dec 8, 4:00 PM
christos added a comment to D54125: sound: Stop building midi as a module.

But now unload errors can't be reported.

Mon, Dec 8, 3:32 PM
christos requested review of D54127: snd_dummy: Initial MIDI support.
Mon, Dec 8, 3:31 PM
christos requested review of D54126: sound: Retire midi_devs and mstat_lock.
Mon, Dec 8, 3:31 PM
christos added a comment to D54102: snd_uaudio: Do not use pcm_channel->lock to protect uaudio_chan.

What problem does this fix?

Mon, Dec 8, 2:52 PM
christos requested review of D54125: sound: Stop building midi as a module.
Mon, Dec 8, 2:38 PM
christos added inline comments to D54038: sound examples: Check if setting property was successful.
Mon, Dec 8, 1:49 PM

Sat, Dec 6

christos requested review of D54103: sound: Retire pcm_feeder->desc_static.
Sat, Dec 6, 3:39 PM
christos requested review of D54102: snd_uaudio: Do not use pcm_channel->lock to protect uaudio_chan.
Sat, Dec 6, 2:52 PM
christos committed rG643a606fa274: sndctl(8): Do not free and re-open device (authored by christos).
sndctl(8): Do not free and re-open device
Sat, Dec 6, 2:29 PM
christos closed D54031: sndctl(8): Do not free and re-open device.
Sat, Dec 6, 2:29 PM
christos added a comment to D54032: sndctl(8): Add libxo support.

Bump.

Sat, Dec 6, 2:29 PM
christos added inline comments to D54038: sound examples: Check if setting property was successful.
Sat, Dec 6, 2:26 PM
christos committed rG26365bf2516f: sound: Retire snd_mixer->busy (authored by christos).
sound: Retire snd_mixer->busy
Sat, Dec 6, 1:36 PM

Thu, Dec 4

christos added inline comments to D54032: sndctl(8): Add libxo support.
Thu, Dec 4, 4:41 PM
christos updated the diff for D54032: sndctl(8): Add libxo support.

Refer to xo_options(7), not libxo(3).

Thu, Dec 4, 4:41 PM
christos added inline comments to D54032: sndctl(8): Add libxo support.
Thu, Dec 4, 4:22 PM
christos added inline comments to D54032: sndctl(8): Add libxo support.
Thu, Dec 4, 4:04 PM
christos added inline comments to D54038: sound examples: Check if setting property was successful.
Thu, Dec 4, 3:46 PM
christos accepted D54071: uio.h: Indent struct uio according to style(9).
Thu, Dec 4, 3:17 PM
christos added inline comments to D54038: sound examples: Check if setting property was successful.
Thu, Dec 4, 3:16 PM
christos added a reviewer for D54032: sndctl(8): Add libxo support: mckusick.
Thu, Dec 4, 3:10 PM
christos added inline comments to D54038: sound examples: Check if setting property was successful.
Thu, Dec 4, 3:07 PM
christos added a comment to D54038: sound examples: Check if setting property was successful.

We can have this check for SNDCTL_DSP_CHANNELS as well. Also the commit title and message have to be adapted.

Thu, Dec 4, 11:14 AM

Tue, Dec 2

christos added a comment to D54038: sound examples: Check if setting property was successful.

You can extend this to the rest of the settings in this patch.

Tue, Dec 2, 8:38 PM
christos updated the diff for D54032: sndctl(8): Add libxo support.

Update man page as well.

Tue, Dec 2, 1:29 PM
christos requested review of D54032: sndctl(8): Add libxo support.
Tue, Dec 2, 1:20 PM
christos requested review of D54031: sndctl(8): Do not free and re-open device.
Tue, Dec 2, 1:20 PM
christos added a comment to D53614: sound tests: Test hot-unload.

Bump. Again, this is problematic when running with -v parallelism because it might unload snd_dummy when the other tests are using it.

Tue, Dec 2, 11:02 AM
christos added a comment to D53749: sound examples: Add mmap example.

Are you working on the timing issues? I haven't really looked into those.

Tue, Dec 2, 10:45 AM

Fri, Nov 28

christos added a comment to D53749: sound examples: Add mmap example.

I think this needs to be rebased since we committed the oss.h changes.

Fri, Nov 28, 3:10 PM
christos committed rG7587270512d1: sound examples: Fix buffer mapping/allocation (authored by meka_tilda.center).
sound examples: Fix buffer mapping/allocation
Fri, Nov 28, 2:37 PM
christos committed rGe5d50a679aa1: sound: Retire snd_mixer->busy (authored by christos).
sound: Retire snd_mixer->busy
Fri, Nov 28, 2:36 PM
christos committed rGb1e9512cba83: sound: Fix revents in midi_poll() (authored by Nicolas Provost <dev@nicolas-provost.fr>).
sound: Fix revents in midi_poll()
Fri, Nov 28, 2:36 PM
christos committed rG47bb49b54098: sound: Retire snd_mtx* wrappers (authored by christos).
sound: Retire snd_mtx* wrappers
Fri, Nov 28, 2:36 PM
christos committed rG839da868a5f9: sound: Merge PCM_ALIVE() with PCM_REGISTERED() (authored by christos).
sound: Merge PCM_ALIVE() with PCM_REGISTERED()
Fri, Nov 28, 2:36 PM
christos closed D53859: sound: Retire snd_mixer->busy.
Fri, Nov 28, 2:36 PM
christos committed rGefb513fc19c8: sound: Clean up midi/ includes (authored by christos).
sound: Clean up midi/ includes
Fri, Nov 28, 2:36 PM
christos committed rG48765e9306e9: sound: Simplify logic in dsp_io_ops() (authored by christos).
sound: Simplify logic in dsp_io_ops()
Fri, Nov 28, 2:36 PM
christos added inline comments to D53859: sound: Retire snd_mixer->busy.
Fri, Nov 28, 2:31 PM

Thu, Nov 27

christos committed rG068b20e200fb: sound: Fix KASSERT panics in chn_read() and chn_write() (authored by christos).
sound: Fix KASSERT panics in chn_read() and chn_write()
Thu, Nov 27, 12:34 AM
christos committed rG3cf8333f877d: sound: Remove vchan_passthrough() and hw.snd.passthrough_verbose (authored by christos).
sound: Remove vchan_passthrough() and hw.snd.passthrough_verbose
Thu, Nov 27, 12:34 AM

Wed, Nov 26

christos committed rGebf1d98d6072: sound examples: Fix buffer mapping/allocation (authored by meka_tilda.center).
sound examples: Fix buffer mapping/allocation
Wed, Nov 26, 7:34 PM
christos closed D53939: sound examples: Fix buffer mapping/allocation.
Wed, Nov 26, 7:34 PM
christos accepted D53939: sound examples: Fix buffer mapping/allocation.
Wed, Nov 26, 7:30 PM

Mon, Nov 24

christos committed rG8f8b8e4af91d: sound: Fix revents in midi_poll() (authored by Nicolas Provost <dev@nicolas-provost.fr>).
sound: Fix revents in midi_poll()
Mon, Nov 24, 1:36 PM
christos added inline comments to D53896: snd_hdsp*: Fix M_NOWAIT malloc(9) calls.
Mon, Nov 24, 1:18 PM
christos added inline comments to D53749: sound examples: Add mmap example.
Mon, Nov 24, 12:31 PM
christos retitled D53896: snd_hdsp*: Fix M_NOWAIT malloc(9) calls from snd_hdsp*: Fix some M_NOWAIT malloc(9) calls to snd_hdsp*: Fix M_NOWAIT malloc(9) calls.
Mon, Nov 24, 12:30 PM