[opensuse] Creating a swap file
Hello, I'd like to create a 2 GB swap file after adding more memory to my system, however how can I create such file by modifying the command below; dd if=/dev/zero of=/extra-swap bs=1024 count=1024 Is 'count' in Mb or Kb? Many thanks, ~James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Am Donnerstag, 11. Januar 2007 22:57 schrieb James D. Parra:
Hello,
I'd like to create a 2 GB swap file after adding more memory to my system, however how can I create such file by modifying the command below;
dd if=/dev/zero of=/extra-swap bs=1024 count=1024
Is 'count' in Mb or Kb?
in blocks. and in your example, the blocksize (bs parameter) is 1 kb, so the file would be 1024kb = 1 megabyte. its all in the man page, by the way. bye, MH -- gpg key fingerprint: 5F64 4C92 9B77 DE37 D184 C5F9 B013 44E7 27BD 763C -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James, On Thursday 11 January 2007 13:57, James D. Parra wrote:
Hello,
I'd like to create a 2 GB swap file after adding more memory to my system, however how can I create such file by modifying the command below;
dd if=/dev/zero of=/extra-swap bs=1024 count=1024
Is 'count' in Mb or Kb?
Neither. Count is the number of blocks transferred. The block size is given by the bs= argument. If the input and output block sizes are different (ibs= is the input block size, obs= is the output block size), count refers to the number of input blocks read. The total number of bytes transferred, assuming end-of-file is not reached, is the block size times the number of blocks. (/dev/zero never returns end-of-file, by the way.) To create your 2 GB swap file, do this: % dd if=/dev/zero of=/extra-swap bs=2K count=1M
~James
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2007-01-11 15:57, James D. Parra wrote:
Hello,
I'd like to create a 2 GB swap file after adding more memory to my system, however how can I create such file by modifying the command below;
A swap ~file~?? You'd be far better off doing some repartitioning to create a new swap partition, as you'll then avoid all the overhead of the filesystem on the partition where the swapfile resides. That being said,
dd if=/dev/zero of=/extra-swap bs=1024 count=1024
bs= specifies the blocksize, in bytes, and count= specifies the number of blocks. You may use multiplicative suffixes to specify each of these, eg. your line is equivalent to this: dd if=/dev/zero of=/extra-swap bs=1K count=1K The following byte/count specifications will all create the 2G file you desire: bs=2G count=1 (though this will probably hardly be practical) bs=2M count=1K bs=2K count=1M (Note that kB, MB and GB all refer to powers of 1000, not 1024. This is standard SI nomenclature.) -- The best way to accelerate a computer running Windows is at 9.81 m/s² -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 11 January 2007 14:42, Darryl Gregorash wrote:
...
dd if=/dev/zero of=/extra-swap bs=1K count=1K
The following byte/count specifications will all create the 2G file you desire:
bs=2G count=1 (though this will probably hardly be practical) bs=2M count=1K bs=2K count=1M
(Note that kB, MB and GB all refer to powers of 1000, not 1024. This is standard SI nomenclature.)
Actually, for dd the units are CS (1024, 1024 * 1024, 1024 * 1024 * 1024, resp.). To wit: % dd if=/dev/zero of=/dev/null bs=2K count=1M 1048576+0 records in 1048576+0 records out 2147483648 bytes (2.1 GB) copied, 1.30146 seconds, 1.7 GB/s If you divide it out, you find that it's using power-of-two Ks, Ms and Gs (except for the summary line--go figure). Also, for some reason 'm' is not allowed, only 'M', but either 'k' or 'K' are allowed but both mean 1024 (I tried 'em both). Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 11 January 2007 16:57, Randall R Schulz wrote:
Actually, for dd the units are CS (1024, 1024 * 1024, 1024 * 1024 * 1024, resp.).
To wit:
% dd if=/dev/zero of=/dev/null bs=2K count=1M 1048576+0 records in 1048576+0 records out 2147483648 bytes (2.1 GB) copied, 1.30146 seconds, 1.7 GB/s
If you divide it out, you find that it's using power-of-two Ks, Ms and Gs (except for the summary line--go figure).
Also, for some reason 'm' is not allowed, only 'M', but either 'k' or 'K' are allowed but both mean 1024 (I tried 'em both).
Randall Schulz
And don't forget to swapon the file... man swapon for more info. Stan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 12 January 2007 00:10, S Glasoe wrote:
Actually, for dd the units are CS (1024, 1024 * 1024, 1024 * 1024 * 1024, resp.).
To wit:
% dd if=/dev/zero of=/dev/null bs=2K count=1M 1048576+0 records in 1048576+0 records out 2147483648 bytes (2.1 GB) copied, 1.30146 seconds, 1.7 GB/s
If you divide it out, you find that it's using power-of-two Ks, Ms and Gs (except for the summary line--go figure).
Also, for some reason 'm' is not allowed, only 'M', but either 'k' or 'K' are allowed but both mean 1024 (I tried 'em both).
And don't forget to swapon the file... man swapon for more info.
And don't forget to mkswap after dd before swapon. See man mkswap, too. # dd ... # mkswap ... # swapon ... (# $EDITOR /etc/fstab) -- Andreas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2007-01-11 16:57, Randall R Schulz wrote:
On Thursday 11 January 2007 14:42, Darryl Gregorash wrote:
...
dd if=/dev/zero of=/extra-swap bs=1K count=1K
The following byte/count specifications will all create the 2G file you desire:
bs=2G count=1 (though this will probably hardly be practical) bs=2M count=1K bs=2K count=1M
(Note that kB, MB and GB all refer to powers of 1000, not 1024. This is standard SI nomenclature.)
Actually, for dd the units are CS (1024, 1024 * 1024, 1024 * 1024 * 1024, resp.).
Oh, good grief, Randall, please read the damn manpage: " BLOCKS and BYTES may be followed by the following multiplicative suffixes: xM M, c 1, w 2, b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y." -- The best way to accelerate a computer running Windows is at 9.81 m/s² -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 11 January 2007 15:32, Darryl Gregorash wrote:
On 2007-01-11 16:57, Randall R Schulz wrote:
On Thursday 11 January 2007 14:42, Darryl Gregorash wrote:
...
(Note that kB, MB and GB all refer to powers of 1000, not 1024. This is standard SI nomenclature.)
Actually, for dd the units are CS (1024, 1024 * 1024, 1024 * 1024 * 1024, resp.).
Oh, good grief, Randall, please read the damn manpage:
" BLOCKS and BYTES may be followed by the following multiplicative suffixes: xM M, c 1, w 2, b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y."
Correct. I didn't spot that paragraph and just tried a few experiments. I still don't get why its authors didn't recognize lower-case 'm' as equivalent to upper-case 'M'. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
I still don't get why its authors didn't recognize lower-case 'm' as equivalent to upper-case 'M'.
Maybe because M == Mega and m == milli? There's no such collision with k and K. -- John Perry -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 11 January 2007 20:38, John E. Perry wrote:
Randall R Schulz wrote:
I still don't get why its authors didn't recognize lower-case 'm' as equivalent to upper-case 'M'.
Maybe because M == Mega and m == milli? There's no such collision with k and K.
Ah. Perhaps that's it. They could still allow 'mK' to equal 1 and 'mM' to equal 1024...
John Perry
RRS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2007-01-11 18:12, Randall R Schulz wrote:
<snip>
I still don't get why its authors didn't recognize lower-case 'm' as equivalent to upper-case 'M'.
Lower-case stands for 'milli' and there are no millibytes :-) The 'k' can be upper or lower case, depending on context (eg. KB vs. km/h, etc), though the lower case 'k' is the SI rule. -- The best way to accelerate a computer running Windows is at 9.81 m/s² -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2007-01-12 at 01:14 -0600, Darryl Gregorash wrote:
On 2007-01-11 18:12, Randall R Schulz wrote:
<snip>
I still don't get why its authors didn't recognize lower-case 'm' as equivalent to upper-case 'M'.
Lower-case stands for 'milli' and there are no millibytes :-)
The 'k' can be upper or lower case, depending on context (eg. KB vs. km/h, etc), though the lower case 'k' is the SI rule.
And btw, "B" is for bytes (octets) and "b" for bits The term "Byte" comes from by-eight. So, "only 26mb swap is used" is *not* very much... -- pgp-id: 926EBB12 pgp-fingerprint: BE97 1CBF FAC4 236C 4A73 F76E EDFC D032 926E BB12 Registered linux user: 75761 (http://counter.li.org) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hans Witvliet wrote:
On Fri, 2007-01-12 at 01:14 -0600, Darryl Gregorash wrote:
On 2007-01-11 18:12, Randall R Schulz wrote:
<snip>
I still don't get why its authors didn't recognize lower-case 'm' as equivalent to upper-case 'M'.
Lower-case stands for 'milli' and there are no millibytes :-)
The 'k' can be upper or lower case, depending on context (eg. KB vs. km/h, etc), though the lower case 'k' is the SI rule.
And btw, "B" is for bytes (octets) and "b" for bits The term "Byte" comes from by-eight.
Do your have any reference for that? A byte is the basic addressing unit of memory, that's all. I still remember the CDC 6600 where a byte was only 6 bit; this was one of the first computers that I worked with. I think I remember that the 6600-documentation referred to the IBM Stretch (the 7030, an earlier supercomputer, built from 1961-1964) as having coined that word. But I may be wrong, that's too long ago now. Or the PDP-10, there were 9 bits per byte, giving a 36-bit word. (I'm a bit older, as you might guess from my examples. :-) Since these things were all named bytes in their time (late 70s and early 80s), I doubt your linguistic derivation. Once upon a time, if one really wanted to emphasis the 8-bit-property, one used the correct technical term octet, that you cited as well above. You still find it in many Internet Standards, which were written before the 8-bit byte became so common. Of course, for current usage, you're right. Nobody in their right mind would expect a byte to be anything different than 8-bit today. But I think you got your history wrong; or it was at least a different history than the one I experienced personally. Cheers, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Joachim Schrod wrote:
Hans Witvliet wrote:
And btw, "B" is for bytes (octets) and "b" for bits The term "Byte" comes from by-eight.
Do your have any reference for that?
A byte is the basic addressing unit of memory, that's all.
Well, my instructors in the early '70's told me that a byte was analogous to "bite" -- not the smallest "bit" accessible, but smaller than the full-size "word" of most architectures of the time. And some architectures do allow you direct access to a bit. bit: smallest piece bite or byte: manageable chunk to chew on steak or word: full-size portion (the culinary examples are my own) -- John Perry -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 15 January 2007 17:50, John E. Perry wrote:
Joachim Schrod wrote:
Hans Witvliet wrote:
And btw, "B" is for bytes (octets) and "b" for bits The term "Byte" comes from by-eight.
Do your have any reference for that?
A byte is the basic addressing unit of memory, that's all.
Well, my instructors in the early '70's told me that a byte was analogous to "bite" -- not the smallest "bit" accessible, but smaller than the full-size "word" of most architectures of the time. And some architectures do allow you direct access to a bit.
bit: smallest piece bite or byte: manageable chunk to chew on steak or word: full-size portion
(the culinary examples are my own)
--
John Perry
bit - individual binary number 1 or 0 byte - 8 bits word - depends on the processor 16, 32 or 64 bits Mike -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 15 January 2007 21:18, Mike Noble wrote:
...
bit - individual binary number 1 or 0 byte - 8 bits
That's a contemporary definition, but not a universal one. There have been several other numbers of bits per byte over the history of the digital computer.
word - depends on the processor 16, 32 or 64 bits
Likewise.
Mike
RRS -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Mike Noble wrote:
bit - individual binary number 1 or 0 byte - 8 bits word - depends on the processor 16, 32 or 64 bits
While those are now common, years ago there were 12 & 18 bit computers, probably others too. I believe 4 bit cpu's may still be made for embedded controllers etc. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Mon, 15 Jan 2007, by mgnoble@gmail.com:
On Monday 15 January 2007 17:50, John E. Perry wrote:
Joachim Schrod wrote:
Hans Witvliet wrote:
And btw, "B" is for bytes (octets) and "b" for bits The term "Byte" comes from by-eight.
Do your have any reference for that?
A byte is the basic addressing unit of memory, that's all.
Well, my instructors in the early '70's told me that a byte was analogous to "bite" -- not the smallest "bit" accessible, but smaller than the full-size "word" of most architectures of the time. And some architectures do allow you direct access to a bit.
Why only some? Aren't shift- and logical operations part of all CPU architectures?
bit: smallest piece bite or byte: manageable chunk to chew on steak or word: full-size portion
(the culinary examples are my own)
--
John Perry
bit - individual binary number 1 or 0
Nybble - half a byte.
byte - 8 bits word - depends on the processor 16, 32 or 64 bits
Mike
Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131 SUSE 9.2 + Jabber: muadib@jabber.xs4all.nl Kernel 2.6.8 + See headers for PGP/GPG info. Claimer: any email I receive will become my property. Disclaimers do not apply. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-01-20 at 11:26 +0100, Theo v. Werkhoven wrote:
Well, my instructors in the early '70's told me that a byte was analogous to "bite" -- not the smallest "bit" accessible, but smaller than the full-size "word" of most architectures of the time. And some architectures do allow you direct access to a bit.
Why only some? Aren't shift- and logical operations part of all CPU architectures?
That's not direct access to a bit, IMO. Direct access would be an operation that would load into a register a certain bit, or another that would compare directly to a certain bit in a byte in memory (in one op). I have never seen it, though. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFsg4CtTMYHG2NR9URAnP/AJ4luD5x+PTuNRQbsKRiRZj9amMCLQCffWcw fIliJPC8kJbk2nzq25yqbDM= =yOBT -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday, January 20, 2007 @ 6:42 AM, Carlos Robinson wrote:
The Saturday 2007-01-20 at 11:26 +0100, Theo v. Werkhoven wrote:
Well, my instructors in the early '70's told me that a byte was analogous to "bite" -- not the smallest "bit" accessible, but smaller than the full-size "word" of most architectures of the time. And some architectures do allow you direct access to a bit.
Why only some? Aren't shift- and logical operations part of all CPU architectures?
That's not direct access to a bit, IMO. Direct access would be an operation that would load into a register a certain bit, or another that would compare directly to a certain bit in a byte in memory (in one op). I have never seen it, though.
Well, on the second point I think there is the capability of doing a compare under mask where you mask all of the bits except the one you want to compare against. You still load a full word into memory though, even though you're only comparing against one bit. At least that's the way I understand it.
- -- Cheers, Carlos E. R.
Greg Wallace -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-01-20 at 14:41 -0600, Greg Wallace wrote:
than the full-size "word" of most architectures of the time. And some architectures do allow you direct access to a bit.
Why only some? Aren't shift- and logical operations part of all CPU architectures?
That's not direct access to a bit, IMO. Direct access would be an operation that would load into a register a certain bit, or another that would compare directly to a certain bit in a byte in memory (in one op). I have never seen it, though.
Well, on the second point I think there is the capability of doing a compare under mask where you mask all of the bits except the one you want to compare against. You still load a full word into memory though, even though you're only comparing against one bit. At least that's the way I understand it.
Not quite, using masks we still operate on the full byte or word. It's a logic trick, only the "target" bit will modify the output. But the operation is on the whole. That is, we can make decissions based on the state of a certain bit, for instance, but the procesor can not directly access a bit. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFsrbjtTMYHG2NR9URAqNWAJ9N5barBTZ3OFXAAoB5B3Do0NRMgACaAygO BrwbHiB5nhN+HNOY1TM08GM= =shgR -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
<snip>
That is, we can make decissions based on the state of a certain bit, for instance, but the procesor can not directly access a bit. That depends on what bits you are talking about. I don't remember very much assembler, but ADC and JZ are just two instructions that come to mind. Do they access single bits in the status register, or do they mask
On 2007-01-20 18:42, Carlos E. R. wrote: the status register, when executed? -- The best way to accelerate a computer running Windows is at 9.81 m/s² -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Darryl Gregorash
That depends on what bits you are talking about. I don't remember very much assembler, but ADC and JZ are just two instructions that come to mind. Do they access single bits in the status register, or do they mask the status register, when executed?
It may be time to alter the 'Subject:' ??? -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 OpenSUSE Linux http://en.opensuse.org/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sat, 20 Jan 2007, by robin.listas@telefonica.net:
The Saturday 2007-01-20 at 11:26 +0100, Theo v. Werkhoven wrote:
Well, my instructors in the early '70's told me that a byte was analogous to "bite" -- not the smallest "bit" accessible, but smaller than the full-size "word" of most architectures of the time. And some architectures do allow you direct access to a bit.
Why only some? Aren't shift- and logical operations part of all CPU architectures?
That's not direct access to a bit, IMO. Direct access would be an operation that would load into a register a certain bit, or another that would compare directly to a certain bit in a byte in memory (in one op). I have never seen it, though.
That would be rather inefficient opcodes I think, and I can't think of any circumstance where that would be neccesary. Perhaps that's why you don't see it. Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131 SUSE 9.2 + Jabber: muadib@jabber.xs4all.nl Kernel 2.6.8 + See headers for PGP/GPG info. Claimer: any email I receive will become my property. Disclaimers do not apply. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Theo v. Werkhoven wrote:
Sat, 20 Jan 2007, by robin.listas@telefonica.net:
That's not direct access to a bit, IMO. Direct access would be an operation that would load into a register a certain bit, or another that would compare directly to a certain bit in a byte in memory (in one op). I have never seen it, though.
That would be rather inefficient opcodes I think, and I can't think of any circumstance where that would be neccesary. Perhaps that's why you don't see it.
Theo
IIRC, bit manipulation was one of the advantages of the Zilog Z80 over the Intel 8080 & 8085. Of course, that's over 30 years ago now. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-01-20 at 22:37 +0100, Theo v. Werkhoven wrote:
Why only some? Aren't shift- and logical operations part of all CPU architectures?
That's not direct access to a bit, IMO. Direct access would be an operation that would load into a register a certain bit, or another that would compare directly to a certain bit in a byte in memory (in one op). I have never seen it, though.
That would be rather inefficient opcodes I think, and I can't think of any circumstance where that would be neccesary. Perhaps that's why you don't see it.
I think you can get those things in small cpus for small code size. I'm just guessing. Microcontrollers, perhaps? I have heard fo that "feature" previously, but I never seen it. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFsrXttTMYHG2NR9URAuG1AJ0cXCuViURl//kgZukqVpknIO+2+wCeIJwH OSCJBOtCQbzO/QG0aN+M160= =62E1 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Theo v. Werkhoven wrote:
Sat, 20 Jan 2007, by robin.listas@telefonica.net:
The Saturday 2007-01-20 at 11:26 +0100, Theo v. Werkhoven wrote:
Well, my instructors in the early '70's told me that a byte was analogous to "bite" -- not the smallest "bit" accessible, but smaller than the full-size "word" of most architectures of the time. And some architectures do allow you direct access to a bit. Why only some? Aren't shift- and logical operations part of all CPU architectures? That's not direct access to a bit, IMO. Direct access would be an operation that would load into a register a certain bit, or another that would compare directly to a certain bit in a byte in memory (in one op). I have never seen it, though.
That would be rather inefficient opcodes I think, and I can't think of any circumstance where that would be neccesary. Perhaps that's why you don't see it.
Hardware-intensive control requires bit testing and setting. Several microprocessors used opcodes like "bittest {address}, bitno" to test a single bit in a single instruction with only a single memory or I/O access to the target address. They had a corresponding "bitset" operation, too. This was important when memory was expensive and small, and when processors were slow. What's inefficient from that point of view is the modern memory-only access, requiring loading a bitmask, loading the target address, operation, storing the result. Of course, now that memory is nearly infinite for nearly zero cost, processors are lightspeed fast, and compilers have replaced assemblers as the programming environment of choice, "efficiency" has flip-flopped. -- John Perry -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Jan 11 2007 16:42, Darryl Gregorash wrote:
On 2007-01-11 15:57, James D. Parra wrote:
Hello,
I'd like to create a 2 GB swap file after adding more memory to my system, however how can I create such file by modifying the command below;
A swap ~file~?? You'd be far better off doing some repartitioning to create a new swap partition, as you'll then avoid all the overhead of the filesystem on the partition where the swapfile resides.
I would not wonder if the swap file was implicitly activated with O_DIRECT. Ask LKML perhaps. -`J' -- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (16)
-
Andreas Winkelmann
-
Carlos E. R.
-
Darryl Gregorash
-
Greg Wallace
-
Hans Witvliet
-
James D. Parra
-
James Knott
-
Jan Engelhardt
-
Joachim Schrod
-
John E. Perry
-
Mathias Homann
-
Mike Noble
-
Patrick Shanahan
-
Randall R Schulz
-
S Glasoe
-
Theo v. Werkhoven