Does anybody has experience with configure --enable-preemption?
It looks like there is code in the VM. Does it work with Linux at least? regards Wolfgang |
----- Op 30 mei 2020 om 19:14 schreef Wolfgang Dann [hidden email]: > Does anybody has experience with configure --enable-preemption? > It looks like there is code in the VM. Does it work with Linux > at least? > > regards Wolfgang Hi, I am not familiar with this feature, but because I read about it here: I tried to configure --enable-preemption on Solaris (with gst 3.2.91). The configure / make / make install works. $ find . -name '*.h' | xargs grep ENABLE_PREEMPT ./config.h:#define ENABLE_PREEMPTION 1 $ find . -name '*.c' | xargs grep ENABLE_PREEMPT ./libgst/interp.c:#ifdef ENABLE_PREEMPTION ./libgst/interp.c:#ifdef ENABLE_PREEMPTION ./libgst/interp.c:#ifdef ENABLE_PREEMPTION I am not sure what I can or should test now. Do you know more about this "enable preemption" feature ?? If I run PATH=/usr/gnu/bin:$PATH gmake check, the output of the checks is: ## -------------------------------- ## ## GNU Smalltalk 3.2.91 test suite. ## ## -------------------------------- ## Regression tests. 1: arrays.st ok 2: classes.st ok 3: blocks.st ok 4: sets.st ok 5: processes.st ok 6: exceptions.st ok 7: intmath.st ok 8: floatmath.st ok 9: dates.st ok 10: objects.st ok 11: strings.st ok 12: chars.st ok 13: delays.st ok 14: geometry.st ok 15: cobjects.st ok 16: compiler.st ok 17: fileext.st ok 18: mutate.st ok 19: getopt.st ok 20: quit.st ok 21: pools.st ok 22: shape.st ok 23: streams.st ok 24: xlat.st ok Other simple tests. 25: ackermann.st ok 26: ary3.st ok 27: except.st ok 28: fibo.st ok 29: hash.st ok 30: hash2.st ok 31: heapsort.st ok 32: lists.st ok 33: lists1.st ok 34: lists2.st ok 35: matrix.st ok 36: methcall.st ok 37: nestedloop.st ok 38: objinst.st ok 39: prodcons.st ok 40: random-bench.st ok 41: sieve.st ok 42: strcat.st ok 43: stcompiler.st ok Basic packages. 44: SUnit ok 45: Parser ok ANSI compliancy tests. 46: ArrayANSITest ok 47: ArrayFactoryANSITest ok 48: BagANSITest ok 49: BagFactoryANSITest ok 50: BooleanANSITest ok 51: ByteArrayANSITest ok 52: ByteArrayFactoryANSITest ok 53: CharacterANSITest ok 54: CharacterFactoryANSITest ok 55: DateAndTimeANSITest ok 56: DateAndTimeFactoryANSITest ok 57: DictionaryANSITest ok 58: DictionaryFactoryANSITest ok 59: DurationANSITest ok 60: DurationFactoryANSITest ok 61: DyadicValuableANSITest ok 62: ErrorANSITest ok 63: ErrorClassANSITest ok 64: ExceptionANSITest ok 65: ExceptionClassANSITest ok 66: ExceptionSetANSITest ok 67: FailedMessageANSITest ok 68: FileStreamFactoryANSITest ok 69: FloatANSITest ok 70: FloatCharacterizationANSITest ok 71: FractionANSITest ok 72: FractionFactoryANSITest ok 73: IdentityDictionaryANSITest ok 74: IdentityDictionaryFactoryANSITest ok 75: IntegerANSITest ok 76: IntervalANSITest ok 77: IntervalFactoryANSITest ok 78: MessageNotUnderstoodANSITest ok 79: MessageNotUnderstoodSelectorANSITest ok 80: MonadicBlockANSITest ok 81: NilANSITest ok 82: NiladicBlockANSITest ok 83: NotificationANSITest ok 84: NotificationClassANSITest ok 85: ObjectANSITest ok 86: ObjectClassANSITest ok 87: OrderedCollectionANSITest ok 88: OrderedCollectionFactoryANSITest ok 89: ReadFileStreamANSITest ok 90: ReadStreamANSITest ok 91: ReadStreamFactoryANSITest ok 92: ReadWriteStreamANSITest ok 93: ReadWriteStreamFactoryANSITest ok 94: ScaledDecimalANSITest ok 95: SelectorANSITest ok 96: SetANSITest ok 97: SetFactoryANSITest ok 98: SortedCollectionANSITest ok 99: SortedCollectionFactoryANSITest ok 100: StringANSITest ok 101: StringFactoryANSITest ok 102: SymbolANSITest ok 103: TranscriptANSITest ok 104: WarningANSITest ok 105: WarningClassANSITest ok 106: WriteFileStreamANSITest ok 107: WriteStreamANSITest ok 108: WriteStreamFactoryANSITest ok 109: ZeroDivideANSITest ok 110: ZeroDivideFactoryANSITest ok Other packages. 111: Announcements ok 112: Complex ok 113: Continuations ok 114: DBD-MySQL skipped (testsuite.at:152) 115: DBD-PostgreSQL skipped (testsuite.at:153) 116: DBD-SQLite ok 117: DebugTools ok 118: DhbNumericalMethods ok 119: Digest ok 120: GDBM ok 121: Iconv FAILED (testsuite.at:159) 122: I18N ok 123: Kernel-Tests ok 124: Magritte ok 125: Netlink skipped (testsuite.at:163) 126: ROE ok 127: ObjectDumper ok 128: SandstoneDb ok 129: Seaside-Core ok 130: Sockets expected failure (testsuite.at:168) 131: Sport ok 132: Swazoo ok 133: XML-XMLParser ok 134: XML-Expat ok 135: ZLib ok ## ------------- ## ## Test results. ## ## ------------- ## ERROR: 132 tests were run, 2 failed (1 expected failure). 3 tests were skipped. The Iconv failure is also happening in the non-preemption case. I don't know more about this --enable-preemption enable preemptive multitasking but I can only report that it seems to configure and compile/build on Solaris. Regards, David Stes |
Am Mittwoch, den 03.06.2020, 10:04 +0200 schrieb [hidden email]:
> ----- Op 30 mei 2020 om 19:14 schreef Wolfgang Dann [hidden email]: > > > Does anybody has experience with configure --enable-preemption? > > It looks like there is code in the VM. Does it work with Linux > > at least? > > > > regards Wolfgang > > Hi, > > I am not familiar with this feature, but because I read about it > here: > > [tests] > The Iconv failure is also happening in the non-preemption case. > > I don't know more about this > > --enable-preemption enable preemptive multitasking > > but I can only report that it seems to configure and compile/build on > Solaris. > > Regards, > David Stes I did not look closer at it by now. I wanted to know if anybody has experience with this before that. If I am right the code should enable OS threads for GNU Smalltalk. All other implementations of smalltalk I looked at just use green threads, that means they are threading in smalltalk itself, so they cannot use more than one core. I don't have any multithreading code in smalltalk by now. If you have some code that uses multithreading, you could watch if GNU Smalltalk starts OS processes or uses more than one core at a time. I was really astound that GNU Smalltalk has this kind of option. I watched a discussion of the squeak developers who had no clue how to do it with squeak and if it's possible at all with smalltalk. Here are some links: https://wiki.squeak.org/squeak/552 https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiK7I_b3OXpAhXR_KQKHXBYCgwQFjAAegQIAhAB&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F30697906%2Fhow-to-use-multi-threading-in-squeak-smalltalk&usg=AOvVaw2_mx8gzeZEbkAAHX6I1hjh |
By default "configure" seems to configure with grep PREEMPT config.h /* #undef ENABLE_PREEMPTION */ undefined. That also compiles on Solaris, and I don't see much difference, but that may be my lack of knowledge on this. All I can say is that they both compile and seem to work, but further testing is required, I suppose. Without the --enable-preemption "gmake check" gives ERROR: 132 tests were run, 2 failed (1 expected failure). 3 tests were skipped. For "gmake check" I have to set the PATH to include /usr/gnu/bin/ because the testsuite script uses AWK syntax that requires GNU awk. A guess is that those tests do not actually test the preemption multiprocessing feature ... I don't know. David Stes ----- Op 3 jun 2020 om 15:29 schreef Wolfgang Dann [hidden email]: > Am Mittwoch, den 03.06.2020, 10:04 +0200 schrieb [hidden email]: >> ----- Op 30 mei 2020 om 19:14 schreef Wolfgang Dann [hidden email]: >> >> > Does anybody has experience with configure --enable-preemption? >> > It looks like there is code in the VM. Does it work with Linux >> > at least? >> > >> > regards Wolfgang >> >> Hi, >> >> I am not familiar with this feature, but because I read about it >> here: >> >> [tests] > >> The Iconv failure is also happening in the non-preemption case. >> >> I don't know more about this >> >> --enable-preemption enable preemptive multitasking >> >> but I can only report that it seems to configure and compile/build on >> Solaris. >> >> Regards, >> David Stes > > I did not look closer at it by now. I wanted to know if anybody > has experience with this before that. If I am right the code should > enable OS threads for GNU Smalltalk. All other implementations > of smalltalk I looked at just use green threads, that means they > are threading in smalltalk itself, so they cannot use more than one > core. I don't have any multithreading code in smalltalk by now. > If you have some code that uses multithreading, you could watch > if GNU Smalltalk starts OS processes or uses more than one core at > a time. > I was really astound that GNU Smalltalk has this kind of option. > I watched a discussion of the squeak developers who had no clue how > to do it with squeak and if it's possible at all with smalltalk. > > Here are some links: > > https://wiki.squeak.org/squeak/552 > > https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiK7I_b3OXpAhXR_KQKHXBYCgwQFjAAegQIAhAB&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F30697906%2Fhow-to-use-multi-threading-in-squeak-smalltalk&usg=AOvVaw2_mx8gzeZEbkAAHX6I1hjh |
In reply to this post by Wolfgang Dann
Wolfgang Dann writes: > Does anybody has experience with configure --enable-preemption? > It looks like there is code in the VM. Does it work with Linux > at least? My feeling is it is a feature that not battle tested. True preemption is very hard to get right. However I believe gnu smalltalk is single threaded, so it may not be that bad. Derek. > > regards Wolfgang |
Am Mittwoch, den 03.06.2020, 15:04 +0000 schrieb Derek Zhou:
> Wolfgang Dann writes: > > > Does anybody has experience with configure --enable-preemption? > > It looks like there is code in the VM. Does it work with Linux > > at least? > My feeling is it is a feature that not battle tested. True preemption > is > very hard to get right. However I believe gnu smalltalk is single > threaded, > so it may not be that bad. > > Derek. > > > regards Wolfgang > > That is my first impression too. But maybe GNU Smalltalk is already capable of this on some platforms. That would be really amazing since it is scaling with every new processor generation. That's much better than a jit compiler, which is not scaling. I will look at it a bit further when I have the time for it and report if I get a clue. regards Wolfgang |
Free forum by Nabble | Edit this page |