Skip to content

Task07#144

Open
ant112342 wants to merge 3 commits into
Kernel-GL-HRK:anton.kotsiubailofrom
ant112342:task07
Open

Task07#144
ant112342 wants to merge 3 commits into
Kernel-GL-HRK:anton.kotsiubailofrom
ant112342:task07

Conversation

@ant112342
Copy link
Copy Markdown

Done task07

ekovalyov and others added 2 commits March 24, 2021 14:32
Signed-off-by: Anton Kotsiubailo <antohakotsubailo@gmail.com>
Copy link
Copy Markdown
Contributor

@alexposukhov alexposukhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have only minor comments

Comment thread 07_memory/kernel/memory.c Outdated
}


void mod_cleanup(void)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add __ exit modificator

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread 07_memory/kernel/memory.c
t_min->alloc_time, t_max->free_time,
(uint32_t)t_aver->free_time / MAX_BUF_SIZE, t_min->free_time);

}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change indent

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread 07_memory/kernel/memory.c Outdated


} while (--iter);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is trailing whitespace, please remove it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, done

Comment thread 07_memory/kernel/memory.c Outdated
t->alloc_time);
t_max->free_time = max(t_max->free_time,
t->free_time);
t_min->alloc_time = max(t_min->alloc_time,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you think than min should be used here instead of max?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, fixed

Implement refactoring for task07 codes.

Signen-off-by: Anton Kotsiubailo <antohakotsubailo@gmail.com>
Comment thread 07_memory/kernel/log.txt
Comment on lines +4 to +29
[10658.836929] size alloc, max alloc, min alloc, avg free, max free, min free, avg
[10658.837145] 2^00 17088.000 us 352.3204550792 us 17088.000 us 6320.000 us 175.3204550792 us 6320.000 us
[10658.837425] 2^01 1696.000 us 458.3204550792 us 1696.000 us 1072.000 us 264.3204550792 us 1072.000 us
[10658.837593] 2^02 1040.000 us 553.3204550792 us 1040.000 us 800.000 us 346.3204550792 us 800.000 us
[10658.837751] 2^03 976.000 us 647.3204550792 us 976.000 us 768.000 us 428.3204550792 us 768.000 us
[10658.837969] 2^04 1136.000 us 743.3204550792 us 1136.000 us 768.000 us 511.3204550792 us 768.000 us
[10658.838172] 2^05 1040.000 us 839.3204550792 us 1040.000 us 816.000 us 593.3204550792 us 816.000 us
[10658.838384] 2^06 1008.000 us 933.3204550792 us 1008.000 us 784.000 us 676.3204550792 us 784.000 us
[10658.838585] 2^07 1712.000 us 1039.3204550792 us 1712.000 us 832.000 us 759.3204550792 us 832.000 us
[10658.838772] 2^08 1872.000 us 1147.3204550792 us 1872.000 us 992.000 us 845.3204550792 us 992.000 us
[10658.838965] 2^09 1616.000 us 1250.3204550792 us 1616.000 us 928.000 us 929.3204550792 us 928.000 us
[10658.839170] 2^10 11424.000 us 1510.3204550792 us 11424.000 us 816.000 us 1012.3204550792 us 816.000 us
[10658.839358] 2^11 1680.000 us 1614.3204550792 us 1680.000 us 1248.000 us 1103.3204550792 us 1248.000 us
[10658.839547] 2^12 1904.000 us 1727.3204550792 us 1904.000 us 1152.000 us 1190.3204550792 us 1152.000 us
[10658.839722] 2^13 1360.000 us 1828.3204550792 us 1360.000 us 896.000 us 1274.3204550792 us 896.000 us
[10658.839925] 2^14 6112.000 us 2104.3204550792 us 6112.000 us 4096.000 us 1502.3204550792 us 4096.000 us
[10658.840121] 2^15 3104.000 us 2340.3204550792 us 3104.000 us 1920.000 us 1696.3204550792 us 1920.000 us
[10658.840321] 2^16 3392.000 us 2596.3204550792 us 3392.000 us 3264.000 us 1925.3204550792 us 3264.000 us
[10658.840528] 2^17 2848.000 us 2872.3204550792 us 2848.000 us 3360.000 us 2198.3204550792 us 3360.000 us
[10658.840751] 2^18 3744.000 us 3213.3204550792 us 3744.000 us 3264.000 us 2528.3204550792 us 3264.000 us
[10658.840999] 2^19 4560.000 us 3682.3204550792 us 4560.000 us 4192.000 us 2994.3204550792 us 4192.000 us
[10658.841285] 2^20 7616.000 us 4452.3204550792 us 7616.000 us 6416.000 us 3757.3204550792 us 6416.000 us
[10658.841640] 2^21 12288.000 us 5715.3204550792 us 12288.000 us 10272.000 us 5054.3204550792 us 10272.000 us
[10658.842148] 2^22 24880.000 us 8060.3204550792 us 24880.000 us 17680.000 us 7447.3204550792 us 17680.000 us
[10658.842967] 2^23 46592.000 us 12568.3204550792 us 46592.000 us 33664.000 us 12021.3204550792 us 33664.000 us
[10658.843146] ------------[ cut here ]------------
Copy link
Copy Markdown

@Anton-Soroka Anton-Soroka Mar 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs rework! This is mathematically not possible!
In your log:

  1. average always equal to max.
  2. min sometimes greater than max

Copy link
Copy Markdown

@Anton-Soroka Anton-Soroka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs rework!

  1. Ensure that both module and user_app - works correctly and print right numbers.
  2. Add a makefile for each.
  3. Ensure that make and checkpatch shows zero warnings.

@Anton-Soroka Anton-Soroka added Change requested Change requested and removed Ready for review Ready for review labels Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Change requested Change requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants