Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: teaching: labs: Clarify role of kill_*_super functions #195

Open
wants to merge 299 commits into
base: master
Choose a base branch
from

Conversation

razvand
Copy link

@razvand razvand commented Jun 18, 2020

Explain the role and use case for kill_litter_super and kill_anon_super functions.

rbaronescu and others added 30 commits January 20, 2019 10:15
* update links to point to 4.15.7 kernel API
* use c constructs (:c:type:``, :c:macro:`` etc)
  to highlight structures, macros etc

Signed-off-by: Anda Nicolae <[email protected]>
* removed links to lxr kernel API
* used :c:type:``, :c:data:``, :c:func:``, etc
  in all lab, when appropriate
* reformulated documentation when needed
* added missing list evolution image

Signed-off-by: Anda Nicolae <[email protected]>
Since the exchange value in atomic_cmpxchg is set at 1, atomic_inc will not reset it, and so, the resource will be busy at any second call. atomic_dec, or simply, atomic_set to 0, as implied in the TODO.
… assigments/ subfolder

Signed-off-by: Razvan Deaconescu <[email protected]>
to avoid confusion with global variable name
tools: assignments: 2-uart: Apply checkpatch.pl

Signed-off-by: Alexandra Sandulescu <[email protected]>
tavip and others added 24 commits March 31, 2020 00:27
Update the RCU diagram so that B to C link is showed as preserved
during the removal phase.

Signed-off-by: Octavian Purdila <[email protected]>
Remove the so2_ prefix which has no relevance currently and simplify
the example to make it easier to demonstrate in the debugging lecture.

Signed-off-by: Octavian Purdila <[email protected]>
Remove a few headers we don't use and the so2 prefix.

More importantly remove the schedule_timeout statement as it is not
needed for lockdep to detect the issue and add debug prints to show
that.

Signed-off-by: Octavian Purdila <[email protected]>
Remove the while (1) block as it is not necessary for lockdep to
detect the issue.

Also, use new APIs to make the code more compact and remove the so2
prefix.

Signed-off-by: Octavian Purdila <[email protected]>
Enable kmemleak in the kernel config and update qemu to start with
256MB as otherwise we get an early memory allocation error.

Signed-off-by: Octavian Purdila <[email protected]>
This is just a workaround, see the thread [1] on the netdev mailing
list for the discussion around this issue. But it allows us to avoid
the initial lockdep warning on boot that disables futher lockdep
checks.

[1] https://www.spinics.net/lists/netdev/msg529595.html

Signed-off-by: Octavian Purdila <[email protected]>
Update the SLUB debugging, kmemleak and lockdep checker sections with
more information a few examples.

Signed-off-by: Octavian Purdila <[email protected]>
As soon as the lock is unlocked in task_info_find_pid,
the caller cannot be sure if the pointer that is returned is valid.
As long as the returned pointer is used, the lock must be held.

In the case of task_info_add_to_list, the lock that must be held is a writer lock,
in case of a reader lock other readers could read an inconsistent state of the struct task_info.
Starting from kernel version 4.10, `bio_set_op_attrs` is marked as
obsolete. The recommended action is to directly assign the `bio_opf`
field of the `struct bio`.

Code extract from `/include/linux/blk_types.h` (v4.19):
```c
/* obsolete, don't use in new code */
static inline void bio_set_op_attrs(struct bio *bio, unsigned op,
		unsigned op_flags)
{
	bio->bi_opf = op | op_flags;
}
```

Signed-off-by: Horia Ion <[email protected]>
`minfs_write_inode` should fill the disk inode with the aquired `uid` and `gid` from the inode, not the other way round.

Please check the `minix` solution below:
https://elixir.bootlin.com/linux/latest/source/fs/minix/inode.c#L557
This fixes errors during the "Install native dependencies" step for
building documentation.

Signed-off-by: Octavian Purdila <[email protected]>
For the `makedev` macro in newer versions of Glibc (since v2.28) we need
to directly include <sys/sysmacros.h>, because that is no longer
included by <sys/types.h>.

Fix by including the correct header.

Signed-off-by: Paul-Stelian Olaru <[email protected]>
Up until this commit only core-image-miminal-* Yocto image files were
ignored.  Others, such as core-image-sato-* Yocto image files were not.
This commit fixes that, will al Yocto image files being ignored.

Signed-off-by: Razvan Deaconescu <[email protected]>
For 5-pitix assignment there is no info about score or the number of test passed (at least a counter). Simple searching for "failed" in output is error prone (and painfully hard for the average Joe).

A simple solution is to add a test_ok var to count the number of passed test. Better solutions exist, but keep it simple stupid as fellow student only care about the number of tests passed to know the homework is okay.
 - Change TODO numbering to match code template
 - Fix and improve testing instructions
@razvand razvand added the labs Kernel practical labs label Jun 18, 2020
@razvand razvand self-assigned this Jun 18, 2020
@lkt-bot
Copy link
Collaborator

lkt-bot commented Jun 18, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
labs Kernel practical labs
Projects
None yet
Development

Successfully merging this pull request may close these issues.