Re: Concurrency Kit and Epoch Based Reclamation
On Tue, Sep 4, 2018 at 12:59 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 03/09/18 11:35, Sebastian Huber wrote: > > Hello, > > > > I have now a prototype implementation of the FreeBSD epoch memory > > reclamation API: > > > > https://github.com/freebsd/freebsd/blob/master/share/man/man9/epoch.9 > > > > I think it would be a nice feature for RTEMS SMP in general. One > > option would be to integrate it in RTEMS instead of libbsd. This would > > require an import of Concurrency Kit to RTEMS: > > > > https://github.com/concurrencykit/ck > > > > Concurrency Kit lacks support for C++ and needs probably some changes > > to work well in uni-processor setups. So, it would need some changes > > for RTEMS. What do you think? > The license has a BSD-style advertising clause. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Is condition #2 ok for inclusion in RTEMS? > > > > Just some more background information. The Concurrency Kit offers an > epoch API for general use and is used by FreeBSD. The epoch API and > implementation from FreeBSD is a specialization which deals also with > the storage management of the epoch records (ck_epoch_record_t) as a > per-processor resource. The use of per-processor data is a very elegant > approach which avoids some life cycle issues which would pop up if > thread-local records would be used. > > The measured performance on a T4240 is quite good. Concurrent enter/exit > scales linearly up to 12 processors, then I guess a bus saturation is > reached. > > -- > Sebastian Huber, embedded brains GmbH > > Address : Dornierstr. 4, D-82178 Puchheim, Germany > Phone : +49 89 189 47 41-16 > Fax : +49 89 189 47 41-09 > E-Mail : sebastian.hu...@embedded-brains.de > PGP : Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Concurrency Kit and Epoch Based Reclamation
On Tue, Sep 4, 2018 at 9:58 AM, Joel Sherrill wrote: > > > On Tue, Sep 4, 2018 at 12:59 AM Sebastian Huber > wrote: >> >> On 03/09/18 11:35, Sebastian Huber wrote: >> > Hello, >> > >> > I have now a prototype implementation of the FreeBSD epoch memory >> > reclamation API: >> > >> > https://github.com/freebsd/freebsd/blob/master/share/man/man9/epoch.9 >> > >> > I think it would be a nice feature for RTEMS SMP in general. One >> > option would be to integrate it in RTEMS instead of libbsd. This would >> > require an import of Concurrency Kit to RTEMS: >> > >> > https://github.com/concurrencykit/ck >> > >> > Concurrency Kit lacks support for C++ and needs probably some changes >> > to work well in uni-processor setups. So, it would need some changes >> > for RTEMS. What do you think? > > > The license has a BSD-style advertising clause. > > Redistribution and use in source and binary forms, with or without > modification, are permitted provided that the following conditions > are met: > 1. Redistributions of source code must retain the above copyright >notice, this list of conditions and the following disclaimer. > 2. Redistributions in binary form must reproduce the above copyright >notice, this list of conditions and the following disclaimer in the >documentation and/or other materials provided with the distribution. > > Is condition #2 ok for inclusion in RTEMS? > This looks to be normal 2-clause BSD? >> >> > >> >> Just some more background information. The Concurrency Kit offers an >> epoch API for general use and is used by FreeBSD. The epoch API and >> implementation from FreeBSD is a specialization which deals also with >> the storage management of the epoch records (ck_epoch_record_t) as a >> per-processor resource. The use of per-processor data is a very elegant >> approach which avoids some life cycle issues which would pop up if >> thread-local records would be used. >> >> The measured performance on a T4240 is quite good. Concurrent enter/exit >> scales linearly up to 12 processors, then I guess a bus saturation is >> reached. >> >> -- >> Sebastian Huber, embedded brains GmbH >> >> Address : Dornierstr. 4, D-82178 Puchheim, Germany >> Phone : +49 89 189 47 41-16 >> Fax : +49 89 189 47 41-09 >> E-Mail : sebastian.hu...@embedded-brains.de >> PGP : Public key available on request. >> >> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel > > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Concurrency Kit and Epoch Based Reclamation
- Am 4. Sep 2018 um 18:07 schrieb Gedare Bloom ged...@rtems.org: > On Tue, Sep 4, 2018 at 9:58 AM, Joel Sherrill wrote: >> >> >> On Tue, Sep 4, 2018 at 12:59 AM Sebastian Huber >> wrote: >>> >>> On 03/09/18 11:35, Sebastian Huber wrote: >>> > Hello, >>> > >>> > I have now a prototype implementation of the FreeBSD epoch memory >>> > reclamation API: >>> > >>> > https://github.com/freebsd/freebsd/blob/master/share/man/man9/epoch.9 >>> > >>> > I think it would be a nice feature for RTEMS SMP in general. One >>> > option would be to integrate it in RTEMS instead of libbsd. This would >>> > require an import of Concurrency Kit to RTEMS: >>> > >>> > https://github.com/concurrencykit/ck >>> > >>> > Concurrency Kit lacks support for C++ and needs probably some changes >>> > to work well in uni-processor setups. So, it would need some changes >>> > for RTEMS. What do you think? >> >> >> The license has a BSD-style advertising clause. >> >> Redistribution and use in source and binary forms, with or without >> modification, are permitted provided that the following conditions >> are met: >> 1. Redistributions of source code must retain the above copyright >>notice, this list of conditions and the following disclaimer. >> 2. Redistributions in binary form must reproduce the above copyright >>notice, this list of conditions and the following disclaimer in the >>documentation and/or other materials provided with the distribution. >> >> Is condition #2 ok for inclusion in RTEMS? >> > This looks to be normal 2-clause BSD? Yes, this is the normal BSD-2-Clause license. The advertising clause is: https://spdx.org/licenses/BSD-4-Clause.html "All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the organization." The CK includes two additional licenses: https://github.com/concurrencykit/ck/blob/master/LICENSE You can find the FreeBSD import here: https://github.com/freebsd/freebsd/tree/master/sys/contrib/ck The CK contains a comprehensive test suite (113 test programs). ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Concurrency Kit and Epoch Based Reclamation
On 5/9/18 2:40 am, Sebastian Huber wrote: > > The CK includes two additional licenses: > > https://github.com/concurrencykit/ck/blob/master/LICENSE I cannot see this file in the FreeBSD import. How does FreeBSD handle this? The IBM code is under the Apache License, Version 2.0. I do not know how this license works as used here. The license states a copy needs to be supplied. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Concurrency Kit and Epoch Based Reclamation
On 05/09/18 01:38, Chris Johns wrote: On 5/9/18 2:40 am, Sebastian Huber wrote: The CK includes two additional licenses: https://github.com/concurrencykit/ck/blob/master/LICENSE I cannot see this file in the FreeBSD import. How does FreeBSD handle this? I guess they rely on per file license headers: https://github.com/freebsd/freebsd/blob/master/sys/contrib/ck/src/ck_hp.c The IBM code is under the Apache License, Version 2.0. I do not know how this license works as used here. The license states a copy needs to be supplied. Where is it stated that a copy needs to be supplied? I only see this "You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0";. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 1/3] libchip/ata: Fix ATA_DRIVER_TABLE_ENTRY
Drop unused and deprecated functions from the ATA_DRIVER_TABLE_ENTRY. Update #3358. Close #3510. --- bsps/include/libchip/ata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsps/include/libchip/ata.h b/bsps/include/libchip/ata.h index 66cc46747d..635d1f0a7d 100644 --- a/bsps/include/libchip/ata.h +++ b/bsps/include/libchip/ata.h @@ -29,7 +29,7 @@ rtems_device_driver rtems_ata_initialize( void *args); #define ATA_DRIVER_TABLE_ENTRY \ -{rtems_ata_initialize, RTEMS_GENERIC_BLOCK_DEVICE_DRIVER_ENTRIES} + { rtems_ata_initialize, NULL, NULL, NULL, NULL, NULL } /* ATA IOCTL request codes */ #define ATAIO_SET_MULTIPLE_MODE _IO('A', 1) -- 2.13.7 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 2/3] bsp/mpc55xxevb: Fix format warning
Close #3504. --- bsps/powerpc/mpc55xxevb/dev/dspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bsps/powerpc/mpc55xxevb/dev/dspi.c b/bsps/powerpc/mpc55xxevb/dev/dspi.c index f6edb560b0..505cd703e7 100644 --- a/bsps/powerpc/mpc55xxevb/dev/dspi.c +++ b/bsps/powerpc/mpc55xxevb/dev/dspi.c @@ -31,6 +31,8 @@ #include +#include + #define MPC55XX_DSPI_FIFO_SIZE 4 #define MPC55XX_DSPI_CTAR_NUMBER 8 @@ -119,7 +121,7 @@ static void mpc55xx_dspi_edma_done( edma_channel_context *ctx, uint32_t error_st rtems_semaphore_release( e->id); if (error_status != 0) { - RTEMS_SYSLOG_ERROR( "eDMA error: 0x%08x\n", error_status); + RTEMS_SYSLOG_ERROR( "eDMA error: 0x%08" PRIx32 "\n", error_status); } } -- 2.13.7 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 3/3] bsps/powerpc: Simplify ppc_exc_initialize()
Remove parameters from ppc_exc_initialize() since all BSP passed the same values. Update #3459. --- bsps/powerpc/beatnik/start/bspstart.c | 18 +- bsps/powerpc/gen5200/start/bspstart.c | 7 ++- bsps/powerpc/gen83xx/start/bspstart.c | 5 + bsps/powerpc/haleakala/start/bspstart.c | 8 +--- bsps/powerpc/include/bsp/vectors.h | 15 --- bsps/powerpc/motorola_powerpc/start/bspstart.c | 13 + bsps/powerpc/mpc55xxevb/start/bspstart.c| 4 bsps/powerpc/mpc8260ads/start/bspstart.c| 8 +--- bsps/powerpc/mvme3100/start/bspstart.c | 13 + bsps/powerpc/mvme5500/start/bspstart.c | 13 + bsps/powerpc/psim/start/bspstart.c | 4 bsps/powerpc/qemuppc/start/bspstart.c | 13 + bsps/powerpc/qoriq/start/bspsmp.c | 3 +-- bsps/powerpc/qoriq/start/bspstart.c | 3 +-- bsps/powerpc/shared/exceptions/ppc_exc_initialize.c | 3 +-- bsps/powerpc/shared/start/bspgetworkarea.c | 3 +-- bsps/powerpc/t32mppc/start/bspstart.c | 3 +-- bsps/powerpc/tqm8xx/start/bspstart.c| 8 +--- bsps/powerpc/virtex/start/bspstart.c| 4 bsps/powerpc/virtex4/start/bspstart.c | 11 +-- bsps/powerpc/virtex5/start/bspstart.c | 11 +-- 21 files changed, 22 insertions(+), 148 deletions(-) diff --git a/bsps/powerpc/beatnik/start/bspstart.c b/bsps/powerpc/beatnik/start/bspstart.c index 91913cd0ed..4c1bb0e16f 100644 --- a/bsps/powerpc/beatnik/start/bspstart.c +++ b/bsps/powerpc/beatnik/start/bspstart.c @@ -177,8 +177,6 @@ void bsp_start( void ) { unsigned char *stack; char *chpt; - uintptr_t intrStackStart; - uintptr_t intrStackSize; Triv121PgTbl pt=0; @@ -231,21 +229,7 @@ void bsp_start( void ) *((uint32_t *)stack) = 0; - /* - * Initialize the interrupt related settings - * SPRG0 = interrupt nesting level count - * SPRG1 = software managed IRQ stack - * - * This could be done latter (e.g in IRQ_INIT) but it helps to understand - * some settings below... - */ - intrStackStart = (uintptr_t)_Configuration_Interrupt_stack_area_begin; - intrStackSize = rtems_configuration_get_interrupt_stack_size(); - - /* - * Initialize default raw exception handlers. See vectors/vectors_init.c - */ - ppc_exc_initialize(intrStackStart, intrStackSize); + ppc_exc_initialize(); printk("CPU: %s\n", get_ppc_cpu_type_name(current_ppc_cpu)); diff --git a/bsps/powerpc/gen5200/start/bspstart.c b/bsps/powerpc/gen5200/start/bspstart.c index 0f981ffee0..e52119fe67 100644 --- a/bsps/powerpc/gen5200/start/bspstart.c +++ b/bsps/powerpc/gen5200/start/bspstart.c @@ -153,13 +153,10 @@ void bsp_start(void) /* Initialize exception handler */ ppc_exc_cache_wb_check = 0; - ppc_exc_initialize( -(uintptr_t) _Configuration_Interrupt_stack_area_begin, -rtems_configuration_get_interrupt_stack_size() - ); + ppc_exc_initialize(); ppc_exc_set_handler(ASM_ALIGN_VECTOR, ppc_exc_alignment_handler); - /* Initalize interrupt support */ + /* Initialize interrupt support */ bsp_interrupt_initialize(); /* diff --git a/bsps/powerpc/gen83xx/start/bspstart.c b/bsps/powerpc/gen83xx/start/bspstart.c index 70fcbea36e..733f43e8ec 100644 --- a/bsps/powerpc/gen83xx/start/bspstart.c +++ b/bsps/powerpc/gen83xx/start/bspstart.c @@ -113,10 +113,7 @@ void bsp_start( void) #ifndef BSP_DATA_CACHE_ENABLED ppc_exc_cache_wb_check = 0; #endif - ppc_exc_initialize( -(uintptr_t) _Configuration_Interrupt_stack_area_begin, -rtems_configuration_get_interrupt_stack_size() - ); + ppc_exc_initialize(); /* Install default handler for the decrementer exception */ sc = ppc_exc_set_handler( ASM_DEC_VECTOR, mpc83xx_decrementer_exception_handler); diff --git a/bsps/powerpc/haleakala/start/bspstart.c b/bsps/powerpc/haleakala/start/bspstart.c index 986582955a..61fb376e28 100644 --- a/bsps/powerpc/haleakala/start/bspstart.c +++ b/bsps/powerpc/haleakala/start/bspstart.c @@ -181,13 +181,7 @@ void bsp_start( void ) /* timebase register ticks/microsecond = CPU Clk in MHz */ bsp_clicks_per_usec = 400; - /* - * Initialize default raw exception handlers. - */ - ppc_exc_initialize( -(uintptr_t) _Configuration_Interrupt_stack_area_begin, -rtems_configuration_get_interrupt_stack_size() - ); + ppc_exc_initialize(); /* * Install our own set of exception vectors diff --git a/bsps/powerpc/include/bsp/vectors.h b/bsps/powerpc/include/bsp/vectors.h index 81526eb4b0..88c60bc8cd 100644 --- a/bsps/powerpc/include/bsp/vectors.h +++ b/bsps/powerpc/include/bsp/vectors.h @@ -300,11 +300,9 @@ rtems_status_code ppc_exc_make_prologue( size_t *prologue_size ); -static inline void ppc_exc_initialize_in
Re: Concurrency Kit and Epoch Based Reclamation
On 5/9/18 3:08 pm, Sebastian Huber wrote: > On 05/09/18 01:38, Chris Johns wrote: >> On 5/9/18 2:40 am, Sebastian Huber wrote: >>> The CK includes two additional licenses: >>> >>> https://github.com/concurrencykit/ck/blob/master/LICENSE >> I cannot see this file in the FreeBSD import. How does FreeBSD handle this? > > I guess they rely on per file license headers: > > https://github.com/freebsd/freebsd/blob/master/sys/contrib/ck/src/ck_hp.c > >> >> The IBM code is under the Apache License, Version 2.0. I do not know how this >> license works as used here. The license states a copy needs to be supplied. > > Where is it stated that a copy needs to be supplied? I only see this "You may > obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0";. > Section 4.a of the license. The file in CK has the "applying the license" template as described in the license's appendix. There is also this link https://www.apache.org/legal/resolved.html#required-third-party-notices and while it deals with Apache releases it seems to have a clear intent. There are other parts of that license I find confusing when applied here, eg 5. As I stated before I am not sure how it works when used here with both licenses. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel