LibBSD | BSD IRQS Task could be Low and influence my drivers work (#5)

geng zhu (@zhugengyu2023) gitlab at rtems.org
Thu Sep 5 02:44:54 UTC 2024



geng zhu created an issue: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/issues/5



## Summary
<!--
Please provide as much information as possible such as error messages or attaching logs
-->

Hello all, I am trying to implment driver for my eMMC/SD device in some armv8a platform, and finding that the default BSD IRQ Task has a fixed priority 96, which is even lower than the default Shell task (priority 1) and BDBuf swap task (priority 95)

```
rtems_task_priority
rtems_bsd_get_task_priority(const char *name)
{
	if (strcmp(name, "IRQS") == 0) {
		return (96);
	} else if (strcmp(name, "TIME") == 0) {
		return (98);
	} else {
		return (100);
	}
}
```

That priority setting cause my eMMC writing speed abnormally slow util my Shell task priority changed to 100 and BDBuf swap task to 105 (lower than BSD IRQ priority), my eMMC writing speed increasd from 8MB/s to 70MB/s, so I wondering if I can configure BSD IRQ Task priority

```
    sc = rtems_shell_init("SHLL", 32 * 1024, 254, CONSOLE_DEVICE_NAME,
                          false, true, NULL); --> lower Shell priority

#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE (512 * 1024)
#define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS 1024
#define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS 4
#define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE (512 * 1024)
#define CONFIGURE_SWAPOUT_TASK_PRIORITY 105
#define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY  105
#define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY 106 --> lower bdbuf swap task priority
```

## Steps to reproduce

-- Before I overrider default priority

![a6d10d192eabcae73d5624e44aeb615](/uploads/ddcdf796013dc2fdce87fdb8776abc7a/a6d10d192eabcae73d5624e44aeb615.png){width=563 height=96}

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-libbsd/-/issues/5
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240905/9d57fa02/attachment.htm>


More information about the bugs mailing list