Re: [PATCH 2/8] mdev: increase netlink buffer sizes

2019-12-17 Thread Jan Klötzke
On Tue, Dec 17, 2019 at 12:01:09AM +, Laurent Bercot wrote:
> 
> > The socket receive buffer turned out to be too small for real world
> > systems. Use the same size as udevd to be on the safe side. As this is
> > just a limit and the memory is not allocated by the kernel until really
> > needed there is actually no memory wasted.
> 
> Is it also the case when overcommit is disabled?
> busybox is used in a lot of embedded systems, and some of them disable
> overcommit. Committing 128 MiB would make mdev completely unusable.

AFAICT it is not accounted to the process memory until the data is
actually queued on the socket.

> Laurent, who still believes leaving the choice to the user is the
> correct approach. https://skarnet.org/software/mdevd/mdevd.html

Hmm, I see that it might be desirable to limit the event queue depth on
resource constraint systems. But the trade-off is to loose the events
and always do a full scan if it happens... :/

/Jan
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


"mount,losetup: use /dev/loop-control is it exists" regression

2019-12-17 Thread Lauri Kasanen
Hi,

In TC, we noticed a regression from the loop-control commit.
"mount: can't setup loop device: No such file or directory" when trying
to mount more than eight loops, on a kernel with loop-control.

It's possibly a race, could be udev didn't have time to create the
device before bb tried to open() it. Probably bb should mknod() it even
in the loop-control path.

- Lauri
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Re: [PATCH 8/8] mdev: remember line number in rule

2019-12-17 Thread Lauri Kasanen
On Mon, 16 Dec 2019 22:56:56 +0100
Jan Klötzke  wrote:

> --- a/util-linux/mdev.c
> +++ b/util-linux/mdev.c
> @@ -299,6 +299,7 @@ struct rule {
>   IF_FEATURE_MDEV_EXEC(char *r_cmd;)
>   regex_t match;
>   struct envmatch *envmatch;
> + int lineno;
>  };

int16_t? Surely mdev.conf cannot be larger than 32767 lines.

- Lauri
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox